From 8578e5b5ad3de2187d2e6d81d0d21a1a2f6a04cb Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 8 Oct 2024 15:08:45 +0200 Subject: [PATCH] [TASK] Reduce phpstan baseline --- Build/phpstan-baseline.neon | 157 ------------------------------------ Build/phpstan.neon | 5 -- 2 files changed, 162 deletions(-) diff --git a/Build/phpstan-baseline.neon b/Build/phpstan-baseline.neon index adcddb322..037cf3a5e 100644 --- a/Build/phpstan-baseline.neon +++ b/Build/phpstan-baseline.neon @@ -1,172 +1,15 @@ parameters: ignoreErrors: - - - message: """ - #^Return type of method BK2K\\\\BootstrapPackage\\\\Hooks\\\\PageRenderer\\\\GoogleFontHook\\:\\:getTemplateService\\(\\) has typehint with deprecated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\TemplateService\\: - This class should not be used anymore, last core usages will be removed during v12\\. - Using methods or properties of this class will start logging deprecation messages\\.$# - """ - count: 1 - path: ../Classes/Hooks/PageRenderer/GoogleFontHook.php - - - - message: """ - #^Fetching deprecated class constant PARAM_STR_ARRAY of class TYPO3\\\\CMS\\\\Core\\\\Database\\\\Connection\\: - Use \\{@see ArrayParameterType\\:\\:STRING\\} instead\\.$# - """ - count: 1 - path: ../Classes/Updates/Criteria/InCriteria.php - - message: "#^Variable method call on \\$this\\(BK2K\\\\BootstrapPackage\\\\Utility\\\\ExternalMediaUtility\\)\\.$#" count: 1 path: ../Classes/Utility/ExternalMediaUtility.php - - - message: "#^Call to deprecated function libxml_disable_entity_loader\\(\\)\\.$#" - count: 2 - path: ../Classes/Utility/SvgUtility.php - - message: "#^Variable property access on SimpleXMLElement\\.$#" count: 2 path: ../Classes/Utility/SvgUtility.php - - - message: "#^Call to method getFlatSettings\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\.$#" - count: 1 - path: ../Classes/Utility/TypoScriptUtility.php - - - - message: "#^Call to method getSetupArray\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\.$#" - count: 1 - path: ../Classes/Utility/TypoScriptUtility.php - - - - message: "#^Class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript not found\\.$#" - count: 2 - path: ../Classes/Utility/TypoScriptUtility.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: ../Classes/Utility/TypoScriptUtility.php - - - - message: "#^Return type \\(mixed\\) of method BK2K\\\\BootstrapPackage\\\\ViewHelpers\\\\File\\\\IsAudioViewHelper\\:\\:renderStatic\\(\\) should be covariant with return type \\(string\\) of method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\ViewHelperInterface\\:\\:renderStatic\\(\\)$#" - count: 1 - path: ../Classes/ViewHelpers/File/IsAudioViewHelper.php - - - - message: "#^Return type \\(mixed\\) of method BK2K\\\\BootstrapPackage\\\\ViewHelpers\\\\File\\\\IsImageViewHelper\\:\\:renderStatic\\(\\) should be covariant with return type \\(string\\) of method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\ViewHelperInterface\\:\\:renderStatic\\(\\)$#" - count: 1 - path: ../Classes/ViewHelpers/File/IsImageViewHelper.php - - - - message: "#^Return type \\(mixed\\) of method BK2K\\\\BootstrapPackage\\\\ViewHelpers\\\\File\\\\IsMediaViewHelper\\:\\:renderStatic\\(\\) should be covariant with return type \\(string\\) of method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\ViewHelperInterface\\:\\:renderStatic\\(\\)$#" - count: 1 - path: ../Classes/ViewHelpers/File/IsMediaViewHelper.php - - - - message: "#^Instanceof between TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Request and TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface will always evaluate to true\\.$#" - count: 1 - path: ../Classes/ViewHelpers/Link/PaginateViewHelper.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: ../Classes/ViewHelpers/Link/PaginateViewHelper.php - - - - message: """ - #^Access to deprecated property \\$tmpl of class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\: - \\: TemplateService is kept for b/w compat in v12 but will be removed in v13\\.$# - """ - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: """ - #^Fetching class constant class of deprecated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\TemplateService\\: - This class should not be used anymore, last core usages will be removed during v12\\. - Using methods or properties of this class will start logging deprecation messages\\.$# - """ - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: """ - #^Instantiation of deprecated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\Parser\\\\TypoScriptParser\\: - This class should not be used anymore\\. Switch to the new parser construct instead\\.$# - """ - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Call to method build\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\AST\\\\AstBuilder\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Call to method setSetupArray\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Call to method setSetupTree\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Call to method tokenize\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\Tokenizer\\\\LossyTokenizer\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\AST\\\\AstBuilder not found\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\AST\\\\Node\\\\RootNode not found\\.$#" - count: 2 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript not found\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\Tokenizer\\\\LossyTokenizer not found\\.$#" - count: 1 - path: ../Tests/Functional/Parser/ScssParserTest.php - - - - message: "#^Access to constant Extend on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\MutationMode\\.$#" - count: 1 - path: ../Configuration/ContentSecurityPolicies.php - - - - message: "#^Access to constant nonceProxy on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\SourceKeyword\\.$#" - count: 1 - path: ../Configuration/ContentSecurityPolicies.php - - - - message: "#^Call to static method frontend\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\Scope\\.$#" - count: 1 - path: ../Configuration/ContentSecurityPolicies.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\Mutation not found\\.$#" - count: 1 - path: ../Configuration/ContentSecurityPolicies.php - - - - message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\MutationCollection not found\\.$#" - count: 1 - path: ../Configuration/ContentSecurityPolicies.php - - message: "#^Implicit array creation is not allowed \\- variable \\$EM_CONF might not exist\\.$#" count: 1 diff --git a/Build/phpstan.neon b/Build/phpstan.neon index a30d46c31..e9f467a2b 100644 --- a/Build/phpstan.neon +++ b/Build/phpstan.neon @@ -1,20 +1,15 @@ includes: - %currentWorkingDirectory%/.build/vendor/phpstan/phpstan-phpunit/extension.neon - %currentWorkingDirectory%/.build/vendor/phpstan/phpstan-strict-rules/rules.neon - - %currentWorkingDirectory%/.build/vendor/phpstan/phpstan-deprecation-rules/rules.neon - %currentWorkingDirectory%/.build/vendor/friendsoftypo3/phpstan-typo3/extension.neon - %currentWorkingDirectory%/Build/phpstan-baseline.neon parameters: level: 8 - reportUnmatchedIgnoredErrors: false ignoreErrors: - identifier: missingType.iterableValue - "#Casting to string something that's already string.#" - - "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#" - - "#^Call to deprecated method registerUniversalTagAttributes\\(\\) of class TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\AbstractTagBasedViewHelper\\:\nWill log deprecation in v4, will be removed in v5\\. No longer necessary since arbitrary arguments are allowed\\.$#" - - "#^Call to deprecated method registerTagAttribute\\(\\) of class TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\AbstractTagBasedViewHelper\\:\nWill log deprecation in v4, will be removed in v5\\. No longer necessary since arbitrary arguments are allowed\\.$#" paths: - %currentWorkingDirectory%/Classes/