Skip to content

Commit

Permalink
[TASK] Add TYPO3 v13 code phpstan errors for TYPO3v12 to baseline
Browse files Browse the repository at this point in the history
PHPStan does not understand or respect TYPO3
version conditional based code to make code
flows based on the TYPO3 version, which leads
to false-positive error reportings.

Until a better solution can be provided, we need
to add them to the depending phpstan baseline file.

Used command(s):

```bash
Build/Scripts/runTests.sh -t 12 -p 8.2 -s composerUpdate
Build/Scripts/runTests.sh -t 12 -p 8.2 -s phpstanGenerateBaseline
Build/Scripts/runTests.sh -t 13 -p 8.2 -s composerUpdate
Build/Scripts/runTests.sh -t 13 -p 8.2 -s phpstanGenerateBaseline
```
  • Loading branch information
sbuerk committed Dec 19, 2024
1 parent 64b52ce commit 111c2b2
Show file tree
Hide file tree
Showing 2 changed files with 295 additions and 0 deletions.
200 changes: 200 additions & 0 deletions Build/phpstan/Core12/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ parameters:
count: 1
path: ../../../Classes/Service/LanguageService.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 1
path: ../../../Classes/Upgrades/FormalityUpgradeWizard.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 1
path: ../../../Classes/Upgrades/FormalityUpgradeWizard.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildBackendRoute\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -105,6 +115,31 @@ parameters:
count: 1
path: ../../../Tests/Functional/Fixtures/Frontend/PhpError.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 2
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor invoked with 7 parameters, 2\\-3 required\\.$#"
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 2
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry not found\\.$#"
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory not found\\.$#"
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -155,6 +190,41 @@ parameters:
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Parameter \\#2 \\$eventDispatcher of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects Psr\\\\EventDispatcher\\\\EventDispatcherInterface, TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory given\\.$#"
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Parameter \\#3 \\$coreCache of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\PhpFrontend\\|null, TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry given\\.$#"
count: 1
path: ../../../Tests/Functional/Hooks/TranslateHookTest.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 2
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor invoked with 7 parameters, 2\\-3 required\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 2
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry not found\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory not found\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -205,6 +275,41 @@ parameters:
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Parameter \\#2 \\$eventDispatcher of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects Psr\\\\EventDispatcher\\\\EventDispatcherInterface, TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory given\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Parameter \\#3 \\$coreCache of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\PhpFrontend\\|null, TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry given\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 2
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor invoked with 7 parameters, 2\\-3 required\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 2
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry not found\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory not found\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -255,11 +360,46 @@ parameters:
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Parameter \\#2 \\$eventDispatcher of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects Psr\\\\EventDispatcher\\\\EventDispatcherInterface, TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory given\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Parameter \\#3 \\$coreCache of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\PhpFrontend\\|null, TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry given\\.$#"
count: 1
path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php

-
message: "#^Cannot access property \\$code on DeepL\\\\Language\\|null\\.$#"
count: 7
path: ../../../Tests/Functional/Services/DeeplServiceTest.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 2
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor invoked with 7 parameters, 2\\-3 required\\.$#"
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 2
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry not found\\.$#"
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory not found\\.$#"
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -310,6 +450,41 @@ parameters:
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Parameter \\#2 \\$eventDispatcher of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects Psr\\\\EventDispatcher\\\\EventDispatcherInterface, TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory given\\.$#"
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Parameter \\#3 \\$coreCache of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\PhpFrontend\\|null, TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry given\\.$#"
count: 1
path: ../../../Tests/Functional/Services/LanguageServiceTest.php

-
message: "#^Call to method write\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter\\.$#"
count: 2
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor invoked with 7 parameters, 2\\-3 required\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteWriter not found\\.$#"
count: 2
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry not found\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory not found\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -359,3 +534,28 @@ parameters:
message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$site with no value type specified in iterable type array\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Parameter \\#2 \\$eventDispatcher of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects Psr\\\\EventDispatcher\\\\EventDispatcherInterface, TYPO3\\\\CMS\\\\Core\\\\Site\\\\SiteSettingsFactory given\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Parameter \\#3 \\$coreCache of class TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\SiteConfiguration constructor expects TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Frontend\\\\PhpFrontend\\|null, TYPO3\\\\CMS\\\\Core\\\\Site\\\\Set\\\\SetRegistry given\\.$#"
count: 1
path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php

-
message: "#^Call to method create\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\View\\\\ViewFactoryInterface\\.$#"
count: 1
path: ../../../Tests/Functional/ViewHelpers/ExtensionActiveViewHelperTest.php

-
message: "#^Class TYPO3\\\\CMS\\\\Core\\\\View\\\\ViewFactoryInterface not found\\.$#"
count: 1
path: ../../../Tests/Functional/ViewHelpers/ExtensionActiveViewHelperTest.php

-
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\View\\\\ViewFactoryData not found\\.$#"
count: 1
path: ../../../Tests/Functional/ViewHelpers/ExtensionActiveViewHelperTest.php
Loading

0 comments on commit 111c2b2

Please sign in to comment.