saschaegerer / phpstan-typo3
TYPO3 CMS class reflection extension for PHPStan
Fund package maintenance!
sascha-egerer
Liberapay
Installs: 433 470
Dependents: 90
Suggesters: 0
Security: 0
Stars: 27
Watchers: 3
Forks: 14
Open Issues: 3
Type:phpstan-extension
Requires
- php: ^7.2 || ^8.0
- nikic/php-parser: >= 4.13
- phpstan/phpstan: ^1.1
- typo3/cms-core: ^8.7 || ^9.5 || ^10.4 || ^11.2
- typo3/cms-extbase: ^8.7 || ^9.5 || ^10.4 || ^11.2
Requires (Dev)
README
TYPO3 CMS class reflection extension for PHPStan & framework-specific rules
Configuration
To use this extension, require it in Composer:
composer require --dev saschaegerer/phpstan-typo3
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use phpstan/extension-installer
, put this into your phpstan.neon config:
includes:
- vendor/saschaegerer/phpstan-typo3/extension.neon
Custom Context API Aspects
If you use custom aspects for the TYPO3 Context API you can now add a mapping so PHPStan knows what type of aspect class is returned by the context API
parameters:
typo3:
contextApiGetAspectMapping:
myCustomAspect: \FlowdGmbh\MyProject\Context\MyCustomAspect