Skip to content

Commit

Permalink
Add dynamicConstantNames configuration
Browse files Browse the repository at this point in the history
Add TYPO3 specific constants to the dynamicConstantNames
parameter of phpstan.
The constants are now marked as dynamic to prevent errors like

```
Strict comparison using === between 'BE' and 'BE' will always
evaluate to true.
```
  • Loading branch information
sascha-egerer committed Feb 11, 2020
1 parent 742192e commit cdf3473
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@ services:
class: SaschaEgerer\PhpstanTypo3\Type\RepositoryDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
parameters:
dynamicConstantNames:
- TYPO3_MODE
- TYPO3_REQUESTTYPE
- TYPO3_COMPOSER_MODE
- TYPO3_branch
- TYPO3_version
- TYPO3_OS
- TYPO3_copyright_year
- PATH_thisScript
- PATH_site
- PATH_typo3conf
- PATH_typo3
- TYPO3_mainDir

0 comments on commit cdf3473

Please sign in to comment.