ssch/typo3-phpstan-rules

Set of PHPStan rules for TYPO3 projects

dev-main / 1.0.x-dev 2023-09-04 20:22 UTC

This package is auto-updated.

Last update: 2024-05-04 21:46:42 UTC


README

Donate

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.

Manual installation

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.