Skip to content

Commit

Permalink
[TASK] Reduce phpstan baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Oct 8, 2024
1 parent 292fa4c commit 8578e5b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 162 deletions.
157 changes: 0 additions & 157 deletions Build/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 0 additions & 5 deletions Build/phpstan.neon
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit 8578e5b

Please sign in to comment.