Interface PHPStan\PhpDoc\StubFilesExtension

This is the extension interface to implement if you want to dynamically load stub files based on your logic. As opposed to simply list them in the configuration file.

To register it in the configuration file use the phpstan.stubFilesExtension service tag:

		class: App\PHPStan\MyExtension
			- phpstan.stubFilesExtension
  • PHPStan\PhpDoc\StubFilesExtension
    • PHPStan\PhpDoc\JsonValidateStubFilesExtension implements StubFilesExtension
    • PHPStan\PhpDoc\CountableStubFilesExtension implements StubFilesExtension
    • PHPStan\PhpDoc\ReflectionEnumStubFilesExtension implements StubFilesExtension
    • PHPStan\PhpDoc\SocketSelectStubFilesExtension implements StubFilesExtension