From cdf3473507c8d5264401dcde460864f9aac31205 Mon Sep 17 00:00:00 2001 From: Sascha Egerer Date: Tue, 11 Feb 2020 21:11:45 +0100 Subject: [PATCH] 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. ``` --- extension.neon | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extension.neon b/extension.neon index 3b9631f..1214091 100644 --- a/extension.neon +++ b/extension.neon @@ -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 \ No newline at end of file