Skip to content

Commit cdf3473

Browse files
committed
Add dynamicConstantNames configuration
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. ```
1 parent 742192e commit cdf3473

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

extension.neon

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,17 @@ services:
2323
class: SaschaEgerer\PhpstanTypo3\Type\RepositoryDynamicReturnTypeExtension
2424
tags:
2525
- phpstan.broker.dynamicMethodReturnTypeExtension
26+
parameters:
27+
dynamicConstantNames:
28+
- TYPO3_MODE
29+
- TYPO3_REQUESTTYPE
30+
- TYPO3_COMPOSER_MODE
31+
- TYPO3_branch
32+
- TYPO3_version
33+
- TYPO3_OS
34+
- TYPO3_copyright_year
35+
- PATH_thisScript
36+
- PATH_site
37+
- PATH_typo3conf
38+
- PATH_typo3
39+
- TYPO3_mainDir

0 commit comments

Comments
 (0)