Contao extension for PHPStan
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
.php_cs.dist
.travis.yml
LICENSE
README.md
composer.json
extension.neon
phpstan.neon.dist
phpunit.xml.dist

README.md

PHPStan Contao Framework extensions and rules

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.