Other than that -- need to know a bit more info about where $WLCAccountClass is instantiated and where it is actually used. if in different files -- maybe you need to typehint it with PHPDoc @var comment ...

$WLCAccountClass is instantiated in ./_includes/site_config.php, and is used in many files both in . and in other subdirectories of . (where . is the document root.) Site_config is always included using a relative path, not via a php_include_path.

It's methods are always highlighted as not found.

It's not the only class whose methods are not found, it's just representative.

OK .. so you are working with manual include/require management. Old style ... kind of like WordPress does.

If so -- try marking such declarations with @global tag like WP does.

Otherwise -- please make some simple test project (reduce your to just 3-4 or so simple files) that I can play with.

In modern frameworks where you have Dependency Injection + Location Containers etc ... you do not need to use plain global variables at all. PhpStorm does not really track such "variable defined here in one place and then somehow get used in include file there" usages. There is an option to inspection .. but I do not think it does much. So proper documenting with PHPDoc comments does help.

There are other ways (IoC containers / Registry class / some static helper methods / passing dependent variables into function/class instead of relaying on global state) that are also more IDE friendly ... but that requires more code change than adding @global or alike PHPDoc.

P.S. "if in different files -- maybe you need to typehint it with PHPDoc @var comment ..." -- when I've said that I meant that it needs to be documented this way where it is used.

Note that I use App\Model\AssistanceCheck\Accounts. In the createtestaccounts method, I call the static method Accounts::createTestAccounts() and Phpstorm does not highlight the class or the method, and I can ^B on the method name and go to it.

In the retrieve method, $account is not highlighted, nor is Account::, and I can get to the Account class with ^B.

class Account extends Model, which is specified. In the Account.php file, I 'use' it with it's full namespace specifier. Back in the fragment above, the where method, which Account inherits from Model, is highlighted as not-found and generates a PHP warning in Phpstorm. This fills my code with warnings.

Anyway, that's a more modern example of the trouble I'm having with this, and I'd really like to understand how PhpStorm finds these things.

I'm using Laravel for a bit more than 1 year now -- the above tools resolve almost everything.

Laravel uses tons (a lot) of magic (facedes and converting calls to non-existing static methods into instance ones) ... while not always having it documented to full extent (e.g. "@return mixed" -- can be anything). In such circumstances PhpStorm cannot resolve it on its own (especially since it does not know how Laravel functions under the hood as it does not provide any special support just for Laravel)... and here is where the aforementioned tools help.

There is no class with FQN "\Crypt" -- it's handled dynamically at runtime by Laravel core by redirecting all into facede class. IDE helper will generate special file with such class defined + other stuff.

>class Account extends Model, which is specified. In the Account.php file, I 'use' it with it's full namespace specifier. Back in the fragment above, the where method, which Account inherits from Model, is highlighted as not-found and generates a PHP warning in Phpstorm. This fills my code with warnings.

Thing is: \Illuminate\Database\Eloquent\Model class does not have "where()" method -- it comes from \Illuminate\Database\Eloquent\Builder . Laravel magic in action -- it makes it work as if it available in Model class itself.

That's why I always add these 2 lines in PHPDoc for every class that extends Model -- helps with non-static calls at very least (I'm trying to avoid magic calls conversion as much as possible).

Andriy, I'm still working with this, and I want to thnk you for your help. I will be back if further questions are discovered. (Note, I'm off to Laracon next week, so will not be doing much with this until August. )