From 7250d726a06ce4ad60d41fd2e38bd82f48c98f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Thu, 19 Dec 2024 13:22:55 +0100 Subject: [PATCH] [TASK] Adjust tooling for v13 compatibility This change modifies the tooling to alow TYPO3 v13 related execution, listed below: * Allow `-t <12|13>` to select TYPO3 v13 as version in `Build/Scripts/runTests.sh` and the composer update script. * Updates the default php version to `8.2` as minimal shared version across core versions. * Allow TYPO3 v13 in `ext_emconf.php` for classic mode instances. * Allow TYPO3 v13 in `composer.json` for the development `EXT:contribution` package. * Add `b13/container` version 3.x as additional version to allow installation as development dependencies against TYPO3 v13. * Added dual major version for nikic/php-parser, required for the `test method` integrity check script. * Add Github Actopn workflow for TYPO3 v13 except functional tests which requires some love first in a dedicated follow up change. * PHPStan is disabled also for now to avoid adding reportings to the baseline which should be properly fixed for dual version support. Used command(s): ```shell composer require \ --no-update \ -d packages/contribution \ "typo3/cms-core":"^12.4.2 || ^13.4" \ "typo3/cms-backend":"^12.4.2 || ^13.4" \ "typo3/cms-frontend":"^12.4.2 || ^13.4" \ "typo3/cms-install":"^12.4.2 || ^13.4" \ "typo3/cms-setup":"^12.4.2 || ^13.4" composer require --dev --no-update \ "b13/container":"^2.3.6 || ^3.1.1" \ "nikic/php-parser":"^4.15.1 || ^5.1.0" ``` --- .github/workflows/testcore13.yml | 134 ++++++++ Build/Scripts/composer-for-core-version.sh | 26 +- Build/Scripts/runTests.sh | 11 +- Build/Scripts/testMethodPrefixChecker.php | 7 +- Build/phpstan/Core13/phpstan-baseline.neon | 361 +++++++++++++++++++++ Build/phpstan/Core13/phpstan.neon | 25 ++ composer.json | 4 +- ext_emconf.php | 14 +- packages/contribution/composer.json | 10 +- packages/contribution/ext_emconf.php | 10 +- 10 files changed, 575 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/testcore13.yml create mode 100644 Build/phpstan/Core13/phpstan-baseline.neon create mode 100644 Build/phpstan/Core13/phpstan.neon diff --git a/.github/workflows/testcore13.yml b/.github/workflows/testcore13.yml new file mode 100644 index 00000000..3aa71465 --- /dev/null +++ b/.github/workflows/testcore13.yml @@ -0,0 +1,134 @@ +name: tests core 13 + +on: + pull_request: + workflow_dispatch: + +jobs: + code-quality: + name: "code quality with core v12" + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + php-version: [ '8.2'] + permissions: + # actions: read|write|none + actions: none + # checks: read|write|none + checks: none + # contents: read|write|none + contents: read + # deployments: read|write|none + deployments: none + # id-token: read|write|none + id-token: none + # issues: read|write|none + issues: none + # discussions: read|write|none + discussions: none + # packages: read|write|none + packages: read + # pages: read|write|none + pages: none + # pull-requests: read|write|none + pull-requests: none + # repository-projects: read|write|none + repository-projects: read + # security-events: read|write|none + security-events: none + # statuses: read|write|none + statuses: none + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Prepare dependencies for TYPO3 v13" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s composerUpdate" + + - name: "Run TypoScript lint" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s lintTypoScript" + + - name: "Run PHP lint" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s lintPhp" + + - name: "Validate CGL" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s cgl -n" + + - name: "Ensure tests methods do not start with \"test\"" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix" + + - name: "Ensure UTF-8 files do not contain BOM" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkBom" + + - name: "Test .rst files for integrity" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkRst" + + - name: "Find duplicate exception codes" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkExceptionCodes" + +# - name: "Run PHPStan" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s phpstan" + + testsuite: + name: all tests with core v13 + runs-on: ubuntu-24.04 + needs: code-quality + strategy: + fail-fast: false + matrix: + php-version: ['8.2', '8.3', '8.4'] + permissions: + # actions: read|write|none + actions: none + # checks: read|write|none + checks: none + # contents: read|write|none + contents: read + # deployments: read|write|none + deployments: none + # id-token: read|write|none + id-token: none + # issues: read|write|none + issues: none + # discussions: read|write|none + discussions: none + # packages: read|write|none + packages: read + # pages: read|write|none + pages: none + # pull-requests: read|write|none + pull-requests: none + # repository-projects: read|write|none + repository-projects: read + # security-events: read|write|none + security-events: none + # statuses: read|write|none + statuses: none + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Prepare dependencies for TYPO3 v13" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s composerUpdate" + + - name: "Unit" + run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s unit" +# @todo Enable after functional tests setup has been fixed +# - name: "Functional SQLite" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d sqlite" +# +# - name: "Functional MariaDB 10.5 mysqli" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli" +# +# - name: "Functional MariaDB 10.5 pdo_mysql" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql" +# +# - name: "Functional MySQL 8.0 mysqli" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli" +# +# - name: "Functional MySQL 8.0 pdo_mysql" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql" +# +# - name: "Functional PostgresSQL 10" +# run: "Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d postgres" diff --git a/Build/Scripts/composer-for-core-version.sh b/Build/Scripts/composer-for-core-version.sh index 8f8cc916..1532abc5 100755 --- a/Build/Scripts/composer-for-core-version.sh +++ b/Build/Scripts/composer-for-core-version.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# @todo This script is crap. It must fall and properly implemented in Build/Scripts/runTests.sh along with +# adding two ddev core instances decoupled from the root composer.json. + composer_cleanup() { echo -e "💥 Cleanup folders" rm -Rf \ @@ -25,14 +28,33 @@ update_v12() { php -dxdebug.mode=off $(which composer) require --dev --no-update \ "phpunit/phpunit":"^10.5" php -dxdebug.mode=off $(which composer) require --no-update \ - "typo3/cms-core":"^12.4.2" + "typo3/minimal":"^12.4" + echo -e "🔥 Update to selected dependencies" + php -dxdebug.mode=off $(which composer) install + php -dxdebug.mode=off $(which composer) remove --no-update \ + "typo3/minimal" +} + +update_v13() { + echo -e "💪 Enforce TYPO3 v13" + php -dxdebug.mode=off $(which composer) require --dev --no-update \ + "phpunit/phpunit":"^10.5" + php -dxdebug.mode=off $(which composer) require --no-update \ + "typo3/minimal":"^13.4" + echo -e "🔥 Update to selected dependencies" + php -dxdebug.mode=off $(which composer) install + php -dxdebug.mode=off $(which composer) remove --no-update \ + "typo3/minimal" } case "$1" in 12) composer_cleanup update_v12 - composer_update + ;; +13) + composer_cleanup + update_v13 ;; *) echo -e "🌀 Usage: ddev update-to (12)" >&2 diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index 9049ebef..8331c0bf 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -215,15 +215,16 @@ Options: - 15 maintained until 2027-11-11 - 16 maintained until 2028-11-09 - -t <12> + -t <12|13> Only with -s composerInstall|composerInstallMin|composerInstallMax Specifies the TYPO3 CORE Version to be used - 12: (default) use TYPO3 v12 + - 12: use TYPO3 v13 -p <8.1|8.2|8.3|8.4> Specifies the PHP minor version to be used - - 8.1: (default) use PHP 8.1 - - 8.2: use PHP 8.2 + - 8.1: use PHP 8.1 + - 8.2: (default) use PHP 8.2 - 8.3: use PHP 8.3 - 8.4: use PHP 8.4 @@ -294,7 +295,7 @@ fi TEST_SUITE="unit" CORE_VERSION="12" DBMS="sqlite" -PHP_VERSION="8.1" +PHP_VERSION="8.2" PHP_XDEBUG_ON=0 PHP_XDEBUG_PORT=9003 PHPUNIT_RANDOM="" @@ -338,7 +339,7 @@ while getopts "a:b:s:d:i:p:t:xy:o:nhu" OPT; do ;; t) CORE_VERSION=${OPTARG} - if ! [[ ${CORE_VERSION} =~ ^(12)$ ]]; then + if ! [[ ${CORE_VERSION} =~ ^(12|13)$ ]]; then INVALID_OPTIONS+=("t ${OPTARG}") fi ;; diff --git a/Build/Scripts/testMethodPrefixChecker.php b/Build/Scripts/testMethodPrefixChecker.php index 817cb330..6c06d69b 100644 --- a/Build/Scripts/testMethodPrefixChecker.php +++ b/Build/Scripts/testMethodPrefixChecker.php @@ -27,7 +27,12 @@ public function enterNode(Node $node): void } } -$parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7); +if ((new \TYPO3\CMS\Core\Information\Typo3Version())->getMajorVersion() >= 13) { + $parser = (new ParserFactory())->createForVersion(\PhpParser\PhpVersion::fromComponents(8, 1)); +} else { + $parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7); +} + $finder = new Symfony\Component\Finder\Finder(); $finder->files() diff --git a/Build/phpstan/Core13/phpstan-baseline.neon b/Build/phpstan/Core13/phpstan-baseline.neon new file mode 100644 index 00000000..3bb73956 --- /dev/null +++ b/Build/phpstan/Core13/phpstan-baseline.neon @@ -0,0 +1,361 @@ +parameters: + ignoreErrors: + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Form\\\\Item\\\\SiteConfigSupportedLanguageItemsProcFunc\\:\\:getSupportedLanguageForField\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Form/Item/SiteConfigSupportedLanguageItemsProcFunc.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Hooks\\\\ButtonBarHook\\:\\:buildParamsArrayForListView\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Hooks/ButtonBarHook.php + + - + message: "#^Parameter \\#1 \\$href of method TYPO3\\\\CMS\\\\Backend\\\\Template\\\\Components\\\\Buttons\\\\LinkButton\\:\\:setHref\\(\\) expects string, Psr\\\\Http\\\\Message\\\\UriInterface given\\.$#" + count: 1 + path: ../../../Classes/Hooks/ButtonBarHook.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Override\\\\Core12\\\\DatabaseRecordList\\:\\:makeLocalizationPanel\\(\\) has parameter \\$translations with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Override/Core12/DatabaseRecordList.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Override\\\\LocalizationController\\:\\:process\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Override/LocalizationController.php + + - + message: "#^Unsafe access to private constant WebVision\\\\Deepltranslate\\\\Core\\\\Override\\\\LocalizationController\\:\\:ACTION_LOCALIZEDEEPL through static\\:\\:\\.$#" + count: 3 + path: ../../../Classes/Override/LocalizationController.php + + - + message: "#^Unsafe access to private constant WebVision\\\\Deepltranslate\\\\Core\\\\Override\\\\LocalizationController\\:\\:ACTION_LOCALIZEDEEPL_AUTO through static\\:\\:\\.$#" + count: 3 + path: ../../../Classes/Override/LocalizationController.php + + - + message: "#^Property WebVision\\\\Deepltranslate\\\\Core\\\\Service\\\\LanguageService\\:\\:\\$possibleLangMatches type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Service/LanguageService.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildBackendRoute\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$flagIcon with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$id with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$lUid_OnPage with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$languageTitle with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$returnUrl with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\DeeplBackendUtility\\:\\:buildTranslateButton\\(\\) has parameter \\$table with no type specified\\.$#" + count: 1 + path: ../../../Classes/Utility/DeeplBackendUtility.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Utility\\\\HtmlUtility\\:\\:stripSpecificTags\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: ../../../Classes/Utility/HtmlUtility.php + + - + message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#" + count: 1 + path: ../../../Classes/Utility/HtmlUtility.php + + - + message: "#^Parameter \\#2 \\$length of function fread expects int\\<1, max\\>, int\\<0, max\\> given\\.$#" + count: 1 + path: ../../../Tests/Functional/AbstractDeepLTestCase.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Fixtures\\\\Frontend\\\\PhpError\\:\\:__construct\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Fixtures/Frontend/PhpError.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Fixtures\\\\Frontend\\\\PhpError\\:\\:handlePageError\\(\\) has parameter \\$reasons with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Fixtures/Frontend/PhpError.php + + - + message: "#^Property WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Fixtures\\\\Frontend\\\\PhpError\\:\\:\\$configuration type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Fixtures/Frontend/PhpError.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildErrorHandlingConfiguration\\(\\) has parameter \\$codes with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildErrorHandlingConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildLanguageConfiguration\\(\\) has parameter \\$fallbackIdentifiers with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:buildLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:failIfArrayIsNotEmpty\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:mergeSiteConfiguration\\(\\) has parameter \\$overrides with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$errorHandling with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Hooks\\\\TranslateHookTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$site with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Hooks/TranslateHookTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildErrorHandlingConfiguration\\(\\) has parameter \\$codes with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildErrorHandlingConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildLanguageConfiguration\\(\\) has parameter \\$fallbackIdentifiers with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:buildLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:failIfArrayIsNotEmpty\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:mergeSiteConfiguration\\(\\) has parameter \\$overrides with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$errorHandling with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\LocalizationInlineRegressionTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$site with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/LocalizationInlineRegressionTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildErrorHandlingConfiguration\\(\\) has parameter \\$codes with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildErrorHandlingConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildLanguageConfiguration\\(\\) has parameter \\$fallbackIdentifiers with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:buildLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:failIfArrayIsNotEmpty\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:mergeSiteConfiguration\\(\\) has parameter \\$overrides with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$errorHandling with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Regression/PreviewTranslationInformationTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Regression\\\\PreviewTranslationInformationTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$site with no value type specified in iterable type array\\.$#" + 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: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildErrorHandlingConfiguration\\(\\) has parameter \\$codes with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildErrorHandlingConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildLanguageConfiguration\\(\\) has parameter \\$fallbackIdentifiers with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:buildLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:failIfArrayIsNotEmpty\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:mergeSiteConfiguration\\(\\) has parameter \\$overrides with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$errorHandling with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Services\\\\LanguageServiceTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$site with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Services/LanguageServiceTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildDefaultLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildErrorHandlingConfiguration\\(\\) has parameter \\$codes with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildErrorHandlingConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildLanguageConfiguration\\(\\) has parameter \\$fallbackIdentifiers with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:buildLanguageConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:failIfArrayIsNotEmpty\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:mergeSiteConfiguration\\(\\) has parameter \\$overrides with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$errorHandling with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + message: "#^Method WebVision\\\\Deepltranslate\\\\Core\\\\Tests\\\\Functional\\\\Updates\\\\FormalityUpgradeWizardTest\\:\\:writeSiteConfiguration\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#" + count: 1 + path: ../../../Tests/Functional/Updates/FormalityUpgradeWizardTest.php + + - + 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 diff --git a/Build/phpstan/Core13/phpstan.neon b/Build/phpstan/Core13/phpstan.neon new file mode 100644 index 00000000..f85bac56 --- /dev/null +++ b/Build/phpstan/Core13/phpstan.neon @@ -0,0 +1,25 @@ +includes: + - ../../../.Build/vendor/saschaegerer/phpstan-typo3/extension.neon + - phpstan-baseline.neon + +parameters: + # Use local .cache dir instead of /tmp + tmpDir: ../../../.cache/phpstan + + level: 8 + + paths: + - ../../../Classes/ + - ../../../Tests/ + + excludePaths: + - ../../../.Build/* + - ../../../Tests/Functional/Updates/Fixtures/Extension/test_extension/ext_emconf.php + - ../../../Tests/Functional/Fixtures/Extensions/test_services_override/ext_emconf.php + - ../../../Tests/Functional/Fixtures/Extensions/testing_framework_backenduserhandler_replacement/ext_emconf.php + + typo3: + contextApiGetAspectMapping: + 'frontend.preview': TYPO3\CMS\Frontend\Aspect\PreviewAspect + requestGetAttributeMapping: + 'typo3.testing.context': TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequestContext diff --git a/composer.json b/composer.json index 7f2fff93..ba178b90 100644 --- a/composer.json +++ b/composer.json @@ -86,12 +86,12 @@ "typo3/cms-setup": "^12.4.2 || ^13.4" }, "require-dev": { - "b13/container": "^2.2", + "b13/container": "^2.3.6 || ^3.1.1", "friendsofphp/php-cs-fixer": "^3.41", "helhum/typo3-console": "^7.1.6 || ^8.0.2", "helmich/phpunit-json-assert": "^3.4.3 || ^3.5.1", "helmich/typo3-typoscript-lint": "^3.1.0", - "nikic/php-parser": "^4.15.1", + "nikic/php-parser": "^4.15.1 || ^5.1.0", "php-mock/php-mock-phpunit": "^2.6", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10.5", diff --git a/ext_emconf.php b/ext_emconf.php index 61177550..f53dd86d 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -12,13 +12,13 @@ 'constraints' => [ 'depends' => [ 'php' => '8.1.0-8.4.99', - 'typo3' => '12.4.0-12.4.99', - 'backend' => '12.4.0-12.4.99', - 'extbase' => '12.4.0-12.4.99', - 'fluid' => '12.4.0-12.4.99', - 'install' => '12.4.0-12.4.99', - 'setup' => '12.4.0-12.4.99', - 'scheduler' => '12.4.0-12.4.99', + 'typo3' => '12.4.0-13.4.99', + 'backend' => '12.4.0-13.4.99', + 'extbase' => '12.4.0-13.4.99', + 'fluid' => '12.4.0-13.4.99', + 'install' => '12.4.0-13.4.99', + 'setup' => '12.4.0-13.4.99', + 'scheduler' => '12.4.0-13.4.99', ], 'conflicts' => [ 'recordlist_thumbnail' => '*', diff --git a/packages/contribution/composer.json b/packages/contribution/composer.json index fd9a9aea..6b4ed354 100644 --- a/packages/contribution/composer.json +++ b/packages/contribution/composer.json @@ -36,11 +36,11 @@ ], "require": { "php": "^8.1 || ^8.2 || ^8.3 || ^8.4", - "typo3/cms-core": "^12.4.2", - "typo3/cms-backend": "^12.4.2", - "typo3/cms-frontend": "^12.4.2", - "typo3/cms-install": "^12.4.2", - "typo3/cms-setup": "^12.4.2" + "typo3/cms-core": "^12.4.2 || ^13.4", + "typo3/cms-backend": "^12.4.2 || ^13.4", + "typo3/cms-frontend": "^12.4.2 || ^13.4", + "typo3/cms-install": "^12.4.2 || ^13.4", + "typo3/cms-setup": "^12.4.2 || ^13.4" }, "extra": { "typo3/cms": { diff --git a/packages/contribution/ext_emconf.php b/packages/contribution/ext_emconf.php index 423de4b1..e7a5330e 100644 --- a/packages/contribution/ext_emconf.php +++ b/packages/contribution/ext_emconf.php @@ -12,11 +12,11 @@ 'constraints' => [ 'depends' => [ 'php' => '8.1.0-8.4.99', - 'typo3' => '12.4.0-12.4.99', - 'backend' => '12.4.0-12.4.99', - 'frontend' => '12.4.0-12.4.99', - 'install' => '12.4.0-12.4.99', - 'setup' => '12.4.0-12.4.99', + 'typo3' => '12.4.0-13.4.99', + 'backend' => '12.4.0-13.4.99', + 'frontend' => '12.4.0-13.4.99', + 'install' => '12.4.0-13.4.99', + 'setup' => '12.4.0-13.4.99', ], 'conflicts' => [], 'suggests' => [],