oneup/phpstan-contao

This package is abandoned and no longer maintained. The author suggests using the contao/phpstan package instead.

Contao Framework extensions and rules for PHPStan

0.2.2 2018-08-21 18:44 UTC

This package is not auto-updated.

Last update: 2022-02-01 13:14:11 UTC


README

This extension provides following features:

  • Provides correct return types for Contao services.

Author Software License Travis CI Coverage Status Total Downloads

Usage

To use this extension, require it in Composer:

composer require --dev oneup/phpstan-contao

And include extension.neon in your project's PHPStan config:

includes:
    - vendor/oneup/phpstan-contao/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/oneup/phpstan-contao/var/cache/dev/appDevPHPStanProjectContainer.xml

Limitations

You have to provide a path to services.yml or similar yml file describing your services.