php - How can I have phpstan find my custom extension class?
one text
Solution:
The extension class needs to be loaded in runtime. You can achieve that in two ways:
Make the class available for the Composer autoloader. It's usually sufficient to configure
section of your composer.json.Create a file called something like
phpstan-autoload.phpin which yourequire_oncethe file with the extension class. And pass the path to thephpstan-autoload.phpfile asoption on the command line when running PHPStan.