typo3-phpstan-rules

Set of rules for PHPStan used by TYPO3 projects.

Downloads
17
Stars
2
Committers
3

TYPO3 PHPStan Rules

Set of (opinionated) rules for PHPStan in TYPO3 Projects

Install

composer require ssch/typo3-phpstan-rules --dev

If you also install phpstan/extension-installer then you're all set for the version independent rules.

If you don't want to use phpstan/extension-installer, include general_typo3_rules.neon in your project's PHPStan config:

includes:
    - vendor/ssch/typo3-phpstan-rules/config/general_typo3_rules.neon

In order to load the TYPO3 version dependent rules, include them manually in your PHPStan config:

includes:
    - vendor/ssch/typo3-phpstan-rules/config/v11/rules.neon
    - vendor/ssch/typo3-phpstan-rules/config/v10/rules.neon
    - vendor/ssch/typo3-phpstan-rules/config/v9/rules.neon
    - vendor/ssch/typo3-phpstan-rules/config/v8/rules.neon

They are not building on each other, so include only the one for your targeted version.