contao/phpstan

This package is abandoned and no longer maintained. No replacement package was suggested.

Contao extension for PHPStan

Fund package maintenance!
to.contao.org/donate

Installs: 43 170

Dependents: 6

Suggesters: 0

Security: 0

Stars: 5

Watchers: 6

Forks: 1

Open Issues: 0

Type:phpstan-extension

0.12.9 2020-12-21 10:30 UTC

README

This extension provides following features:

  • Provides correct return types for Contao services.

GitHub 68747470733a2f2f636f6465636f762e696f2f67682f636f6e74616f2f7068707374616e2f6272616e63682f6d61737465722f67726170682f62616467652e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e74616f2f7068707374616e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e74616f2f7068707374616e2e737667

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.