From 74bf1c0cb99b4d00baa1c7d7b8ac76639f051391 Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Fri, 4 Feb 2022 16:04:31 +0100 Subject: [PATCH] [TASK] Update to phpstan/phpstan:^1.4.5 This brings a couple of fixes for false positives that shrink the baseline by around 90 errors. > composer req --dev phpstan/phpstan:^1.4.5 > Build/Scripts/runTests.sh -s phpstanGenerateBaseline Change-Id: I47ba88117866a59f2b7760539f1be217d1bcde34 Resolves: #96747 Releases: main, 11.5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73295 Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- Build/phpstan/phpstan-baseline.neon | 610 +++------------------------- composer.json | 2 +- composer.lock | 14 +- 3 files changed, 63 insertions(+), 563 deletions(-) diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon index dcf1a36f9c35..8aff63f0634e 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -10,11 +10,6 @@ parameters: count: 1 path: ../../typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/adminpanel/ext_localconf.php - - message: "#^Expression on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -340,6 +335,11 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Classes/Module/ModuleLoader.php + - + message: "#^Result of \\|\\| is always true\\.$#" + count: 1 + path: ../../typo3/sysext/backend/Classes/Module/ModuleLoader.php + - message: "#^Method TYPO3\\\\CMS\\\\Backend\\\\Routing\\\\PreviewUriBuilder\\:\\:create\\(\\) should return static\\(TYPO3\\\\CMS\\\\Backend\\\\Routing\\\\PreviewUriBuilder\\) but returns object\\.$#" count: 1 @@ -482,7 +482,7 @@ parameters: - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 + count: 3 path: ../../typo3/sysext/backend/Classes/Utility/BackendUtility.php - @@ -585,16 +585,6 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Classes/ViewHelpers/Uri/NewRecordViewHelper.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/backend/Tests/Functional/Configuration/SiteConfiguration/Fixtures/Extensions/conf_overriding/a/Configuration/SiteConfiguration/Overrides/site.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/backend/Tests/Functional/Configuration/SiteConfiguration/Fixtures/Extensions/conf_overriding/b/Configuration/SiteConfiguration/Overrides/site.php - - message: "#^Method TYPO3\\\\CMS\\\\Backend\\\\Controller\\\\FormInlineAjaxController\\:\\:createAction\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 4 @@ -740,16 +730,6 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Tests/UnitDeprecated/Utility/BackendUtilityTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/backend/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/backend/ext_tables.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 @@ -765,11 +745,6 @@ parameters: count: 1 path: ../../typo3/sysext/belog/Classes/ViewHelpers/Form/TranslateLabelSelectViewHelper.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/belog/ext_tables.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 @@ -795,11 +770,6 @@ parameters: count: 1 path: ../../typo3/sysext/beuser/Classes/Service/UserInformationService.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/beuser/ext_tables.php - - message: "#^Property TYPO3\\\\CMS\\\\Core\\\\Authentication\\\\AbstractUserAuthentication\\:\\:\\$writeAttemptLog \\(bool\\) on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -930,6 +900,11 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php + - + message: "#^Result of && is always true\\.$#" + count: 2 + path: ../../typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php + - message: "#^Variable \\$pathArray in empty\\(\\) always exists and is not falsy\\.$#" count: 2 @@ -1511,7 +1486,7 @@ parameters: path: ../../typo3/sysext/core/Classes/LinkHandling/LinkService.php - - message: "#^Offset 'type' on \\*NEVER\\* in empty\\(\\) always exists and is always falsy\\.$#" + message: "#^Result of \\|\\| is always true\\.$#" count: 1 path: ../../typo3/sysext/core/Classes/LinkHandling/LinkService.php @@ -1630,6 +1605,11 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/Page/PageRenderer.php + - + message: "#^Result of \\|\\| is always false\\.$#" + count: 1 + path: ../../typo3/sysext/core/Classes/Page/PageRenderer.php + - message: "#^Static property TYPO3\\\\CMS\\\\Core\\\\Page\\\\PageRenderer\\:\\:\\$cache \\(TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\FrontendInterface\\) on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -1975,6 +1955,11 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/Routing/Enhancer/AbstractEnhancer.php + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: ../../typo3/sysext/core/Classes/Routing/Enhancer/AbstractEnhancer.php + - message: "#^Property TYPO3\\\\CMS\\\\Core\\\\Routing\\\\Enhancer\\\\AbstractEnhancer\\:\\:\\$aspects \\(array\\<TYPO3\\\\CMS\\\\Core\\\\Routing\\\\Aspect\\\\AspectInterface\\>\\) on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -2330,16 +2315,6 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/ViewHelpers/Form/TypoScriptConstantsViewHelper.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Configuration/TCA/Overrides/sys_file_storage.php - - message: "#^Parameter \\#2 \\$default of method TYPO3\\\\CMS\\\\Core\\\\Authentication\\\\Mfa\\\\MfaProviderPropertyManager\\:\\:getProperty\\(\\) expects null, string given\\.$#" count: 1 @@ -2395,66 +2370,6 @@ parameters: count: 1 path: ../../typo3/sysext/core/Tests/Functional/Category/Collection/CategoryCollectionTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/sys_category.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_eid/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_fluid_email/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/ext_tables.php - - message: "#^Parameter \\#1 \\$iterator of method TYPO3\\\\TestIrreForeignfield\\\\Controller\\\\AbstractController\\:\\:getStructure\\(\\) expects iterable\\<TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractEntity\\>&Iterator, TYPO3\\\\TestIrreForeignfield\\\\Domain\\\\Model\\\\Content given\\.$#" count: 1 @@ -2465,51 +2380,6 @@ parameters: count: 1 path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Controller/ContentController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributesimple/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnsymmetric/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/ext_tables.php - - message: "#^Property TYPO3\\\\CMS\\\\Core\\\\Tests\\\\Functional\\\\Fixtures\\\\Frontend\\\\PhpError\\:\\:\\$configuration is never read, only written\\.$#" count: 1 @@ -3255,36 +3125,11 @@ parameters: count: 1 path: ../../typo3/sysext/core/Tests/UnitDeprecated/Database/SoftReferenceIndexTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/core/ext_tables.php - - message: "#^Parameter \\#2 \\$widgets of method TYPO3\\\\CMS\\\\Dashboard\\\\DashboardRepository\\:\\:updateWidgetConfig\\(\\) expects array\\<string\\>, array\\<int\\|string, array\\<string, mixed\\>\\> given\\.$#" count: 1 path: ../../typo3/sysext/dashboard/Classes/Controller/WidgetAjaxController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/dashboard/Configuration/TCA/Overrides/be_groups.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/dashboard/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/dashboard/ext_tables.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" count: 1 @@ -3725,6 +3570,11 @@ parameters: count: 1 path: ../../typo3/sysext/extbase/Classes/Service/ImageService.php + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: ../../typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php + - message: "#^Variable \\$object in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -3760,16 +3610,6 @@ parameters: count: 1 path: ../../typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Configuration/TCA/Overrides/fe_groups.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Configuration/TCA/Overrides/fe_users.php - - message: "#^Parameter \\#1 \\$iterator of method ExtbaseTeam\\\\BlogExample\\\\Controller\\\\BlogController\\:\\:getStructure\\(\\) expects iterable\\<TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractEntity\\>&Iterator, array\\|TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\QueryResultInterface given\\.$#" count: 1 @@ -3825,41 +3665,6 @@ parameters: count: 2 path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/PostRepository.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/fe_users.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/Configuration/TCA/Overrides/tx_a_domain_model_a.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/ext_localconf.php - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface\\:\\:isDispatched\\(\\)\\.$#" count: 1 @@ -4425,11 +4230,6 @@ parameters: count: 1 path: ../../typo3/sysext/extbase/Tests/UnitDeprecated/Utility/ExtensionUtilityTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extbase/ext_localconf.php - - message: "#^Call to an undefined method Psr\\\\Http\\\\Message\\\\ServerRequestInterface\\:\\:getArgument\\(\\)\\.$#" count: 1 @@ -4630,16 +4430,6 @@ parameters: count: 1 path: ../../typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extensionmanager/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/extensionmanager/ext_tables.php - - message: "#^Method TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\:\\:fromSettings\\(\\) should return static\\(TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\) but returns TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\.$#" count: 1 @@ -4650,21 +4440,6 @@ parameters: count: 1 path: ../../typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/felogin/Configuration/TCA/Overrides/fe_groups.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/felogin/Configuration/TCA/Overrides/fe_users.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$settings$#" count: 1 @@ -4675,11 +4450,6 @@ parameters: count: 4 path: ../../typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/felogin/ext_localconf.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 @@ -4715,21 +4485,6 @@ parameters: count: 1 path: ../../typo3/sysext/filelist/Classes/FileList.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/filelist/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/filelist/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/filemetadata/Configuration/TCA/Overrides/sys_file_metadata.php - - message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContext\\:\\:getParserConfiguration\\(\\)\\.$#" count: 1 @@ -4975,16 +4730,6 @@ parameters: count: 1 path: ../../typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/fluid_styled_content/ext_localconf.php - - message: "#^Call to an undefined method Psr\\\\Http\\\\Message\\\\ServerRequestInterface\\:\\:getArguments\\(\\)\\.$#" count: 1 @@ -5135,6 +4880,11 @@ parameters: count: 1 path: ../../typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: ../../typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php + - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Form\\\\Domain\\\\Model\\\\Renderable\\\\RenderableInterface\\:\\:getRootForm\\(\\)\\.$#" count: 1 @@ -5221,24 +4971,19 @@ parameters: path: ../../typo3/sysext/form/Classes/Service/TranslationService.php - - message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#" + message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#" count: 1 - path: ../../typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php + path: ../../typo3/sysext/form/Classes/ViewHelpers/GridColumnClassAutoConfigurationViewHelper.php - - message: "#^Dead catch \\- TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Exception\\\\StopActionException is never thrown in the try block\\.$#" + message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#" count: 1 path: ../../typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/form/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" + message: "#^Dead catch \\- TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Exception\\\\StopActionException is never thrown in the try block\\.$#" count: 1 - path: ../../typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php + path: ../../typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php - message: "#^Property TYPO3\\\\CMS\\\\Form\\\\Tests\\\\Functional\\\\Mvc\\\\Validation\\\\MimeTypeValidatorTest\\:\\:\\$tmp is never read, only written\\.$#" @@ -5295,16 +5040,6 @@ parameters: count: 10 path: ../../typo3/sysext/form/Tests/Unit/ViewHelpers/Form/DatePickerViewHelperTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/form/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/form/ext_tables.php - - message: "#^Property TYPO3\\\\CMS\\\\Frontend\\\\Authentication\\\\FrontendUserAuthentication\\:\\:\\$userTS \\(array\\) on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -5571,23 +5306,18 @@ parameters: path: ../../typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php - - message: "#^Offset 'table' on \\*NEVER\\* in empty\\(\\) always exists and is always falsy\\.$#" - count: 1 - path: ../../typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php - - - - message: "#^Offset mixed does not exist on array\\{\\}\\.$#" + message: "#^Offset mixed on array\\{\\} on left side of \\?\\? does not exist\\.$#" count: 1 path: ../../typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php - - message: "#^Offset mixed on array\\{\\} on left side of \\?\\? does not exist\\.$#" + message: "#^Unreachable statement \\- code above always terminates\\.$#" count: 1 path: ../../typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php - message: "#^Variable \\$conf on left side of \\?\\? always exists and is not nullable\\.$#" - count: 5 + count: 4 path: ../../typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php - @@ -6055,16 +5785,6 @@ parameters: count: 1 path: ../../typo3/sysext/frontend/Tests/Unit/Typolink/AbstractTypolinkBuilderTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/frontend/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/frontend/ext_tables.php - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface\\:\\:getUid\\(\\)\\.$#" count: 2 @@ -6076,29 +5796,19 @@ parameters: path: ../../typo3/sysext/impexp/Classes/ImportExport.php - - message: "#^Offset 'msg' on \\*NEVER\\* on left side of \\?\\? always exists and is always null\\.$#" + message: "#^Left side of && is always false\\.$#" count: 2 path: ../../typo3/sysext/impexp/Classes/ImportExport.php - - message: "#^Offset 'updatePath' does not exist on array\\{msg\\: string, ref\\: 'FILE', type\\: 'file', preCode\\: non\\-empty\\-string, title\\: string, showDiffContent\\: string\\}\\.$#" - count: 1 + message: "#^Offset 'msg' on \\*NEVER\\* on left side of \\?\\? always exists and is always null\\.$#" + count: 2 path: ../../typo3/sysext/impexp/Classes/ImportExport.php - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/impexp/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/impexp/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" + message: "#^Offset 'updatePath' does not exist on array\\{msg\\: string, ref\\: 'FILE', type\\: 'file', preCode\\: non\\-empty\\-string, title\\: string, showDiffContent\\: string\\}\\.$#" count: 1 - path: ../../typo3/sysext/impexp/Configuration/TCA/Overrides/tt_content.php + path: ../../typo3/sysext/impexp/Classes/ImportExport.php - message: "#^Dead catch \\- TYPO3\\\\CMS\\\\Core\\\\Http\\\\PropagateResponseException is never thrown in the try block\\.$#" @@ -6120,16 +5830,6 @@ parameters: count: 1 path: ../../typo3/sysext/impexp/Tests/Functional/ImportTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/impexp/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/impexp/ext_tables.php - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface\\:\\:setArguments\\(\\)\\.$#" count: 1 @@ -6195,36 +5895,11 @@ parameters: count: 1 path: ../../typo3/sysext/indexed_search/Classes/Utility/DoubleMetaPhoneUtility.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/indexed_search/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/indexed_search/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/indexed_search/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/indexed_search/ext_tables.php - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" count: 1 path: ../../typo3/sysext/info/Classes/Controller/TranslationStatusController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/info/ext_tables.php - - message: "#^Property TYPO3\\\\CMS\\\\Install\\\\Command\\\\UpgradeWizardListCommand\\:\\:\\$input is never read, only written\\.$#" count: 1 @@ -6305,6 +5980,11 @@ parameters: count: 1 path: ../../typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php + - + message: "#^Result of && is always true\\.$#" + count: 2 + path: ../../typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php + - message: "#^Method TYPO3\\\\CMS\\\\Install\\\\ExtensionScanner\\\\Php\\\\Matcher\\\\MethodAnnotationMatcher\\:\\:enterNode\\(\\) should return int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" count: 1 @@ -6400,6 +6080,11 @@ parameters: count: 2 path: ../../typo3/sysext/install/Classes/Service/LanguagePackService.php + - + message: "#^Strict comparison using \\=\\=\\= between '' and 'excludeFromUpdates' will always evaluate to false\\.$#" + count: 1 + path: ../../typo3/sysext/install/Classes/Service/LanguagePackService.php + - message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#" count: 1 @@ -6455,16 +6140,6 @@ parameters: count: 1 path: ../../typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/GeneratorClassesResolverTest.php - - - message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpParser\\\\\\\\Node\\\\\\\\Expr\\\\\\\\StaticCall' and null will always evaluate to false\\.$#" - count: 1 - path: ../../typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/GeneratorClassesResolverTest.php - - - - message: "#^Cannot access property \\$args on null\\.$#" - count: 1 - path: ../../typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/GeneratorClassesResolverTest.php - - message: "#^Method TYPO3\\\\TestingFramework\\\\Core\\\\AccessibleObjectInterface\\:\\:_call\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 4 @@ -6495,16 +6170,6 @@ parameters: count: 1 path: ../../typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/install/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/install/ext_tables.php - - message: "#^Parameter \\#2 \\$recordUid of method TYPO3\\\\CMS\\\\Linkvalidator\\\\Repository\\\\BrokenLinkRepository\\:\\:removeBrokenLinksForRecord\\(\\) expects int, string given\\.$#" count: 2 @@ -6560,16 +6225,6 @@ parameters: count: 2 path: ../../typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/linkvalidator/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/linkvalidator/ext_tables.php - - message: "#^Binary operation \"\\>\\>\" between string and 1 results in an error\\.$#" count: 2 @@ -6600,16 +6255,6 @@ parameters: count: 1 path: ../../typo3/sysext/lowlevel/Classes/Integrity/DatabaseIntegrityCheck.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/lowlevel/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/opendocs/ext_localconf.php - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FolderInterface\\:\\:checkActionPermission\\(\\)\\.$#" count: 1 @@ -6735,16 +6380,6 @@ parameters: count: 1 path: ../../typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/recordlist/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/recordlist/ext_tables.php - - message: "#^Parameter \\#2 \\$str of function explode expects string, SimpleXMLElement given\\.$#" count: 1 @@ -6770,16 +6405,6 @@ parameters: count: 1 path: ../../typo3/sysext/recycler/Tests/Unit/Task/CleanerFieldProviderTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/recycler/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/recycler/ext_tables.php - - message: "#^Unsafe access to private constant TYPO3\\\\CMS\\\\Redirects\\\\Command\\\\CheckIntegrityCommand\\:\\:REGISTRY_KEY through static\\:\\:\\.$#" count: 2 @@ -6815,41 +6440,16 @@ parameters: count: 1 path: ../../typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/redirects/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/redirects/ext_tables.php - - message: "#^Parameter \\#1 \\$href of method TYPO3\\\\CMS\\\\Backend\\\\Template\\\\Components\\\\Menu\\\\MenuItem\\:\\:setHref\\(\\) expects string, TYPO3\\\\CMS\\\\Core\\\\Http\\\\Uri given\\.$#" count: 2 path: ../../typo3/sysext/reports/Classes/Controller/ReportController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/reports/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/reports/ext_tables.php - - message: "#^Constructor of class TYPO3\\\\CMS\\\\RteCKEditor\\\\Form\\\\Resolver\\\\RichTextNodeResolver has an unused parameter \\$nodeFactory\\.$#" count: 1 path: ../../typo3/sysext/rte_ckeditor/Classes/Form/Resolver/RichTextNodeResolver.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/rte_ckeditor/ext_localconf.php - - message: "#^Parameter \\#1 \\$uid of method TYPO3\\\\CMS\\\\Scheduler\\\\Scheduler\\:\\:fetchTask\\(\\) expects int, string given\\.$#" count: 1 @@ -6900,36 +6500,11 @@ parameters: count: 1 path: ../../typo3/sysext/scheduler/Classes/Task/AbstractTask.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/scheduler/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/scheduler/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/seo/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/seo/Configuration/TCA/Overrides/sys_template.php - - message: "#^PHPDoc tag @var above a method has no effect\\.$#" count: 2 path: ../../typo3/sysext/seo/Tests/Functional/XmlSitemap/XmlSitemapRecordsTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/seo/ext_localconf.php - - message: "#^Elseif condition is always true\\.$#" count: 1 @@ -6945,11 +6520,6 @@ parameters: count: 1 path: ../../typo3/sysext/setup/Classes/Controller/SetupModuleController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/setup/ext_tables.php - - message: "#^Parameter \\#1 \\$pids of method TYPO3\\\\CMS\\\\SysNote\\\\Controller\\\\NoteController\\:\\:listAction\\(\\) expects string, int given\\.$#" count: 1 @@ -6960,66 +6530,11 @@ parameters: count: 2 path: ../../typo3/sysext/sys_note/Classes/Hook/PageHook.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/sys_note/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/sys_note/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/Configuration/TCA/Overrides/be_groups.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/Configuration/TCA/Overrides/be_users.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/Configuration/TCA/Overrides/pages.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/Configuration/TCA/Overrides/sys_template.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/Configuration/TCA/Overrides/tt_content.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/t3editor/ext_localconf.php - - message: "#^If condition is always false\\.$#" count: 1 path: ../../typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/tstemplate/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/tstemplate/ext_tables.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/viewpage/ext_tables.php - - message: "#^Parameter \\#1 \\$route of method TYPO3\\\\CMS\\\\Core\\\\Routing\\\\RouterInterface\\:\\:generateUri\\(\\) expects array\\|string, int given\\.$#" count: 2 @@ -7200,23 +6715,8 @@ parameters: count: 1 path: ../../typo3/sysext/workspaces/Classes/Service/HistoryService.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/workspaces/Configuration/TCA/Overrides/be_users.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" count: 1 path: ../../typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/workspaces/ext_localconf.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: ../../typo3/sysext/workspaces/ext_tables.php - diff --git a/composer.json b/composer.json index 85eb22e89460..9690620906b7 100644 --- a/composer.json +++ b/composer.json @@ -117,7 +117,7 @@ "php-webdriver/webdriver": "^1.11.1", "phpspec/prophecy": "^1.14.0", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^1.4.3", + "phpstan/phpstan": "^1.4.5", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5.10", "typo3/cms-styleguide": "~11.5.3", diff --git a/composer.lock b/composer.lock index ab3bf62eeb4b..457614b3b86a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ac7d5bd0f7bef5d1626382a8508a679d", + "content-hash": "f0a0c1069ac4133253e94fae1466bb21", "packages": [ { "name": "bacon/bacon-qr-code", @@ -7040,16 +7040,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.4.3", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "89d10839dbfc95eeb7da656578b4a899ad2b59b1" + "reference": "150d1fbd82fb71ff76b3bd7f6ea6006d89c5f0c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89d10839dbfc95eeb7da656578b4a899ad2b59b1", - "reference": "89d10839dbfc95eeb7da656578b4a899ad2b59b1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/150d1fbd82fb71ff76b3bd7f6ea6006d89c5f0c3", + "reference": "150d1fbd82fb71ff76b3bd7f6ea6006d89c5f0c3", "shasum": "" }, "require": { @@ -7080,7 +7080,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.3" + "source": "https://github.com/phpstan/phpstan/tree/1.4.5" }, "funding": [ { @@ -7100,7 +7100,7 @@ "type": "tidelift" } ], - "time": "2022-01-28T16:27:17+00:00" + "time": "2022-02-02T19:35:10+00:00" }, { "name": "phpstan/phpstan-phpunit", -- GitLab