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

1.1.2 2022-02-08 16:27 UTC

README

TYPO3 CMS class reflection extension for PHPStan & framework-specific rules

Build Status

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