contao / phpstan
Contao extension for PHPStan
Fund package maintenance!
to.contao.org/donate
Installs: 43 169
Dependents: 6
Suggesters: 0
Security: 0
Stars: 5
Watchers: 6
Forks: 1
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^7.2 || ^8.0
- phpstan/phpstan: ^0.12
- phpstan/phpstan-phpunit: ^0.12
- phpstan/phpstan-symfony: ^0.12
- symfony/dependency-injection: 4.4.*
- symfony/http-foundation: 4.4.*
- symfony/monolog-bundle: ^3.3
- symfony/yaml: ^4.4 || ^5.0
Requires (Dev)
- contao/core-bundle: ^4.9
- contao/news-bundle: ^4.9
- contao/test-case: ^3.0 || ^4.0
- friendsofphp/php-cs-fixer: ^2.14
- phpunit/phpunit: ^8.4
README
This extension provides following features:
- Provides correct return types for Contao services.
Usage
To use this extension, require it in Composer:
composer require --dev contao/phpstan
And include extension.neon in your project's PHPStan config:
includes:
- vendor/contao/phpstan/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon
parameters:
contao:
services_yml_path: %currentWorkingDirectory%/src/Resources/config/services.yml
symfony:
container_xml_path: %currentWorkingDirectory%/vendor/contao/phpstan/var/cache/dev/appDevPHPStanProjectContainer.xml
Limitations
You have to provide a path to services.yml
or similar yml file describing your services.