Extension for PHPStan for better support for Craft CMS. The following features are provided:
- Configure autoload of Craft CMS for analysis
- Stub to support different
ElementQuery-classes
Via Composer
$ composer require --dev studio-stomp/phpstan-craftcmsAdd phpstan-craftcms to the project phpstan.neon / phpstan.neon.dist:
includes:
- vendor/studio-stomp/phpstan-craftcms/extension.neonAdd the level and paths as well to the project phpstan.neon / phpstan.neon.dist:
parameters:
level: max # Or feel free to start at a lower level
paths:
- src # Common in plugins and other composer loaded packages
- modules # Common in Craft CMS project
- tests # Common in bothFeel free to check out the base configuration and expand on it with own configuration. For example:
includes:
- vendor/studio-stomp/phpstan-craftcms/extension.neon
parameters:
ignoreErrors:
- '#Call to an undefined method SoapClient::#'Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.