contao/phpstan

Contao extension for PHPStan

Installs: 23 236

Dependents: 2

Suggesters: 0

Security: 0

Stars: 2

Watchers: 4

Forks: 2

Open Issues: 1

Type:phpstan-extension

0.12.0 2019-12-13 08:02 UTC

This package is auto-updated.

Last update: 2020-02-13 08:39:27 UTC


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.