diff --git a/Build/gitlab-ci/nightly/acceptance-install.yml b/Build/gitlab-ci/nightly/acceptance-install.yml index b25bf70b665e0e9ae0394fbe1aa14a6083b47e13..2066b876b582753acd956c1e63b919d9f380cb6d 100644 --- a/Build/gitlab-ci/nightly/acceptance-install.yml +++ b/Build/gitlab-ci/nightly/acceptance-install.yml @@ -54,7 +54,7 @@ acceptance install mariadb php 8.0 locked: - typo3temp/var/tests/AcceptanceReports script: - Build/Scripts/runTests.sh -s composerInstall -p 8.0 - - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.3 -p 8.0 + - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.6 -p 8.0 acceptance install mariadb php 8.0 max: stage: acceptance needs: [] @@ -70,7 +70,7 @@ acceptance install mariadb php 8.0 max: - typo3temp/var/tests/AcceptanceReports script: - Build/Scripts/runTests.sh -s composerInstallMax -p 8.0 - - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.3 -p 8.0 + - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.6 -p 8.0 acceptance install mariadb php 8.0 min: stage: acceptance needs: [] @@ -86,7 +86,7 @@ acceptance install mariadb php 8.0 min: - typo3temp/var/tests/AcceptanceReports script: - Build/Scripts/runTests.sh -s composerInstallMin -p 8.0 - - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.3 -p 8.0 + - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.6 -p 8.0 acceptance install mariadb php 8.1 locked: stage: acceptance diff --git a/Build/gitlab-ci/nightly/functional.yml b/Build/gitlab-ci/nightly/functional.yml index dde401976b2f961f16a0ce5b4f3fb0d797b1e938..f7af7962e3987398c9b8d466e08e59c5c44f447a 100644 --- a/Build/gitlab-ci/nightly/functional.yml +++ b/Build/gitlab-ci/nightly/functional.yml @@ -31,15 +31,15 @@ functional deprecated mariadb 10.3 php 7.4 min: - Build/Scripts/runTests.sh -s composerInstallMin -p 7.4 - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.3 -p 7.4 -functional deprecated mariadb 10.5 php 8.0 locked: +functional deprecated mariadb 10.5 php 8.2 locked: stage: functional needs: [] only: - schedules script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.0 - - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0 -functional deprecated mariadb 10.5 php 8.0 max: + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.2 +functional deprecated mariadb 10.5 php 8.2 max: stage: functional needs: [] only: @@ -49,9 +49,9 @@ functional deprecated mariadb 10.5 php 8.0 max: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.0 - - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0 -functional deprecated mariadb 10.5 php 8.0 min: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.2 +functional deprecated mariadb 10.5 php 8.2 min: stage: functional needs: [] only: @@ -61,8 +61,8 @@ functional deprecated mariadb 10.5 php 8.0 min: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMin -p 8.0 - - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0 + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.2 functional deprecated mysql 5.5 php 7.4 locked: stage: functional @@ -200,16 +200,16 @@ functional mariadb 10.3 php 7.4 min: - Build/Scripts/runTests.sh -s composerInstallMin -p 7.4 - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.3 -p 7.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -functional mariadb 10.5 php 8.1 locked: +functional mariadb 10.6 php 8.2 locked: stage: functional needs: [] only: - schedules parallel: 6 script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.1 - - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.5 -p 8.1 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -functional mariadb 10.5 php 8.1 max: + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.6 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional mariadb 10.6 php 8.2 max: stage: functional needs: [] only: @@ -220,9 +220,9 @@ functional mariadb 10.5 php 8.1 max: - .cache parallel: 6 script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 - - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.5 -p 8.1 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -functional mariadb 10.5 php 8.1 min: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.6 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional mariadb 10.6 php 8.2 min: stage: functional needs: [] only: @@ -233,8 +233,8 @@ functional mariadb 10.5 php 8.1 min: - .cache parallel: 6 script: - - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 - - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.5 -p 8.1 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.6 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL functional mysql 5.5 php 7.4 locked: stage: functional @@ -308,6 +308,42 @@ functional postgres 10 php 7.4 min: - Build/Scripts/runTests.sh -s composerInstallMin -p 7.4 - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 7.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional postgres 10 php 8.2 locked: + stage: functional + needs: [] + only: + - schedules + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional postgres 10 php 8.2 max: + stage: functional + needs: [] + only: + - schedules + cache: + key: 11.5-composer-max + paths: + - .cache + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional postgres 10 php 8.2 min: + stage: functional + needs: [] + only: + - schedules + cache: + key: 11.5-composer-min + paths: + - .cache + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + functional sqlite php 7.4 locked: stage: functional needs: [] @@ -343,3 +379,39 @@ functional sqlite php 7.4 min: script: - Build/Scripts/runTests.sh -s composerInstallMin -p 7.4 - Build/Scripts/runTests.sh -s functional -d sqlite -p 7.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + +functional sqlite php 8.2 locked: + stage: functional + needs: [] + only: + - schedules + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s functional -d sqlite -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional sqlite php 8.2 max: + stage: functional + needs: [] + only: + - schedules + cache: + key: 11.5-composer-max + paths: + - .cache + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s functional -d sqlite -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL +functional sqlite php 8.2 min: + stage: functional + needs: [] + only: + - schedules + cache: + key: 11.5-composer-min + paths: + - .cache + parallel: 6 + script: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s functional -d sqlite -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL diff --git a/Build/gitlab-ci/nightly/integrity.yml b/Build/gitlab-ci/nightly/integrity.yml index 3b2ff887119ef5084e5cd428903d041608814f5c..5eb0a80fe22ac5ae098e8f25db56a70e32357ab0 100644 --- a/Build/gitlab-ci/nightly/integrity.yml +++ b/Build/gitlab-ci/nightly/integrity.yml @@ -42,6 +42,7 @@ integration various: - Build/Scripts/runTests.sh -s composerTestDistribution -p 7.4 - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.0 - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.1 + - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.2 - Build/Scripts/runTests.sh -s composerInstall -p 7.4 - Build/Scripts/runTests.sh -s checkExceptionCodes -p 7.4 - Build/Scripts/runTests.sh -s checkGitSubmodule -p 7.4 @@ -75,6 +76,13 @@ lint php 8.1: - schedules script: - Build/Scripts/runTests.sh -s lintPhp -p 8.1 +lint php 8.2: + stage: integrity + needs: [] + only: + - schedules + script: + - Build/Scripts/runTests.sh -s lintPhp -p 8.2 lint scss ts html: stage: integrity diff --git a/Build/gitlab-ci/nightly/unit.yml b/Build/gitlab-ci/nightly/unit.yml index dd0e62e02f25bd750dcf594b121741e2f90cbf08..842385bd45d0709126cdf48bcfb839e4531333e8 100644 --- a/Build/gitlab-ci/nightly/unit.yml +++ b/Build/gitlab-ci/nightly/unit.yml @@ -234,6 +234,80 @@ unit php 8.1 locked random: - Build/Scripts/runTests.sh -s composerInstall -p 8.1 - Build/Scripts/runTests.sh -s unitRandom -p 8.1 +unit php 8.1 max: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-max + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 + - Build/Scripts/runTests.sh -s unit -p 8.1 +unit php 8.1 max deprecated: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-max + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 + - Build/Scripts/runTests.sh -s unitDeprecated -p 8.1 +unit php 8.1 max random: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-max + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 + - Build/Scripts/runTests.sh -s unitRandom -p 8.1 + +unit php 8.1 min: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-min + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 + - Build/Scripts/runTests.sh -s unit -p 8.1 +unit php 8.1 min deprecated: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-min + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 + - Build/Scripts/runTests.sh -s unitDeprecated -p 8.1 +unit php 8.1 min random: + stage: unit + needs: [] + only: + - schedules + cache: + key: 11.5-composer-min + paths: + - .cache + script: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 + - Build/Scripts/runTests.sh -s unitRandom -p 8.1 + unit php 8.2 locked: stage: unit needs: [] @@ -259,7 +333,7 @@ unit php 8.2 locked random: - Build/Scripts/runTests.sh -s composerInstall -p 8.2 - Build/Scripts/runTests.sh -s unitRandom -p 8.2 -unit php 8.1 max: +unit php 8.2 max: stage: unit needs: [] only: @@ -269,9 +343,9 @@ unit php 8.1 max: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 - - Build/Scripts/runTests.sh -s unit -p 8.1 -unit php 8.1 max deprecated: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s unit -p 8.2 +unit php 8.2 max deprecated: stage: unit needs: [] only: @@ -281,9 +355,9 @@ unit php 8.1 max deprecated: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 - - Build/Scripts/runTests.sh -s unitDeprecated -p 8.1 -unit php 8.1 max random: + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s unitDeprecated -p 8.2 +unit php 8.2 max random: stage: unit needs: [] only: @@ -293,10 +367,10 @@ unit php 8.1 max random: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.1 - - Build/Scripts/runTests.sh -s unitRandom -p 8.1 + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.2 + - Build/Scripts/runTests.sh -s unitRandom -p 8.2 -unit php 8.1 min: +unit php 8.2 min: stage: unit needs: [] only: @@ -306,9 +380,9 @@ unit php 8.1 min: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 - - Build/Scripts/runTests.sh -s unit -p 8.1 -unit php 8.1 min deprecated: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s unit -p 8.2 +unit php 8.2 min deprecated: stage: unit needs: [] only: @@ -318,9 +392,9 @@ unit php 8.1 min deprecated: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 - - Build/Scripts/runTests.sh -s unitDeprecated -p 8.1 -unit php 8.1 min random: + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s unitDeprecated -p 8.2 +unit php 8.2 min random: stage: unit needs: [] only: @@ -330,5 +404,5 @@ unit php 8.1 min random: paths: - .cache script: - - Build/Scripts/runTests.sh -s composerInstallMin -p 8.1 - - Build/Scripts/runTests.sh -s unitRandom -p 8.1 + - Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 + - Build/Scripts/runTests.sh -s unitRandom -p 8.2 diff --git a/Build/gitlab-ci/pre-merge/acceptance-application.yml b/Build/gitlab-ci/pre-merge/acceptance-application.yml index 3a353cdda27d92e34b9638370d673879e0a7232a..d4d1b0bf9ea3fcbc94d6bdd71324eb73a6533b14 100644 --- a/Build/gitlab-ci/pre-merge/acceptance-application.yml +++ b/Build/gitlab-ci/pre-merge/acceptance-application.yml @@ -14,7 +14,7 @@ acceptance application mariadb php 7.4 pre-merge: - Build/Scripts/runTests.sh -s composerInstall -p 7.4 - Build/Scripts/runTests.sh -s acceptance -p 7.4 -d mariadb -i 10.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -acceptance application mariadb php 8.1 pre-merge: +acceptance application mariadb php 8.2 pre-merge: stage: main except: refs: @@ -30,5 +30,5 @@ acceptance application mariadb php 8.1 pre-merge: - typo3temp/var/tests/AcceptanceReports/reports.xml parallel: 13 script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.1 - - Build/Scripts/runTests.sh -s acceptance -p 8.1 -d mariadb -i 10.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s acceptance -p 8.2 -d mariadb -i 10.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL diff --git a/Build/gitlab-ci/pre-merge/acceptance-install.yml b/Build/gitlab-ci/pre-merge/acceptance-install.yml index d38e07c0abf80de77a12de374f71660f86610afb..ce218d9ad0a62a8b0f4f0fcbcf75c9855fb9641d 100644 --- a/Build/gitlab-ci/pre-merge/acceptance-install.yml +++ b/Build/gitlab-ci/pre-merge/acceptance-install.yml @@ -15,7 +15,7 @@ acceptance install mariadb php 7.4 pre-merge: - Build/Scripts/runTests.sh -s composerInstall -p 7.4 - Build/Scripts/runTests.sh -s acceptanceInstall -d mariadb -i 10.3 -p 7.4 -acceptance install mysql php 8.1 pre-merge: +acceptance install mysql php 8.2 pre-merge: stage: main except: refs: @@ -29,8 +29,8 @@ acceptance install mysql php 8.1 pre-merge: junit: - typo3temp/var/tests/AcceptanceReports/reports.xml script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.1 - - Build/Scripts/runTests.sh -s acceptanceInstall -d mysql -j 5.5 -p 8.1 + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s acceptanceInstall -d mysql -j 5.5 -p 8.2 acceptance install postgres php 7.4 pre-merge: stage: main diff --git a/Build/gitlab-ci/pre-merge/functional.yml b/Build/gitlab-ci/pre-merge/functional.yml index b436269e70fc26d19b38126bbed58096663ddd20..cc5dbc6a087cd80787731796dfed0be11b487137 100644 --- a/Build/gitlab-ci/pre-merge/functional.yml +++ b/Build/gitlab-ci/pre-merge/functional.yml @@ -29,7 +29,7 @@ functional mariadb 10.3 php 8.0 pre-merge: - Build/Scripts/runTests.sh -s composerInstall -p 8.0 - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.3 -p 8.0 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -functional postgres 10 php 8.1 pre-merge: +functional postgres 10 php 8.2 pre-merge: stage: main except: refs: @@ -37,8 +37,8 @@ functional postgres 10 php 8.1 pre-merge: - "11.5" parallel: 10 script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.1 - - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 8.1 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + - Build/Scripts/runTests.sh -s composerInstall -p 8.2 + - Build/Scripts/runTests.sh -s functional -d postgres -k 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL functional sqlite php 7.4 pre-merge: stage: main diff --git a/Build/gitlab-ci/pre-merge/integrity.yml b/Build/gitlab-ci/pre-merge/integrity.yml index 259cfbc9f51bd8881e53566748a2b8c2e4f9804d..78cefdac55c4001d3c215bdcf3caa63ed254e9ab 100644 --- a/Build/gitlab-ci/pre-merge/integrity.yml +++ b/Build/gitlab-ci/pre-merge/integrity.yml @@ -46,6 +46,7 @@ integration various pre-merge: - Build/Scripts/runTests.sh -s composerTestDistribution -p 7.4 - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.0 - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.1 + - Build/Scripts/runTests.sh -s composerTestDistribution -p 8.2 - Build/Scripts/runTests.sh -s composerInstall -p 7.4 - Build/Scripts/runTests.sh -s checkExceptionCodes -p 7.4 - Build/Scripts/runTests.sh -s checkGitSubmodule -p 7.4 @@ -58,6 +59,26 @@ integration various pre-merge: - Build/Scripts/runTests.sh -s checkTestMethodsPrefix -p 7.4 - Build/Scripts/runTests.sh -s checkNamespaceIntegrity -p 7.4 +lint php 7.4 pre-merge: + stage: main + except: + refs: + - schedules + - "11.5" + needs: [] + script: + - Build/Scripts/runTests.sh -s lintPhp -p 7.4 + +lint php 8.2 pre-merge: + stage: main + except: + refs: + - schedules + - "11.5" + needs: [] + script: + - Build/Scripts/runTests.sh -s lintPhp -p 8.2 + lint scss ts html pre-merge: stage: main except: diff --git a/Build/patches/patches-notes.txt b/Build/patches/patches-notes.txt new file mode 100644 index 0000000000000000000000000000000000000000..73d6b085a3dce1ded49e17a3b1c3baddfab1ae30 --- /dev/null +++ b/Build/patches/patches-notes.txt @@ -0,0 +1,37 @@ +Composer Patches +================ + +# Description + +The core may ship composer package versions of third party packages that +are no longer supported by the maintainers. This is done to not break the +backwards compatible promise in the lifetime of TYPO3 core LTS. + +When these packages have bugs, they may not be fixed in "upstream" anymore. +In such cases, the core sometimes ships patches to fix details, for instance +when a core LTS version is extended to support new PHP versions, and if some +third party package then raises issues. + +These patches may be applied using the `cweagans/composer-patches` composer plugin: +They are applied to the legacy `typo3_src.tgz` downloads during packaging. + +The patches are *not* applied to the composer packages, though. Projects can +however copy the `.diff` files, require `cweagans/composer-patches` and +apply the patches if needed. + +## List of patches + +### [postgres-platform-variable-interpolation-php82-fix.diff](postgres-platform-variable-interpolation-php82-fix.diff) + +**Needed**: For PHP8.2 with PostgresSQL dbms backend, if E_DEPRECATION logs are not silenced. + +`PostgreSqlPlatform` from doctrine/dbal contains a variable interpolation which +is deprecated since PHP8.2. This is fixed in newer doctrine/dbal versions, but +will not be fixed for the EOL version 2.13.x, which is used for TYPO3 v11. +The composer patch provided to enable PHP8.2 support for TYPO3 v11. + +PHP8.2 deprecations are compile time errors of E_DEPRECATE, fail if E_ALL is enabled +or if errors are converted to exceptions. The patch is not needed if deprecations +are suppressed and not logged, or if postgres DBMS platform is not used in a project. + +The fix is a simple oneliner avoiding the variable interpolation. diff --git a/Build/patches/patches.json b/Build/patches/patches.json new file mode 100644 index 0000000000000000000000000000000000000000..b2dff32f35a3238331e3b764082e344646cf86cd --- /dev/null +++ b/Build/patches/patches.json @@ -0,0 +1,7 @@ +{ + "patches": { + "doctrine/dbal": { + "[BUGFIX] Avoid deprecated variable interpolation with PHP8.2": "Build/patches/postgres-platform-variable-interpolation-php82-fix.diff" + } + } +} diff --git a/Build/patches/postgres-platform-variable-interpolation-php82-fix.diff b/Build/patches/postgres-platform-variable-interpolation-php82-fix.diff new file mode 100644 index 0000000000000000000000000000000000000000..a315bbc5d757d11f34d9e12d26a25bf8d8e6bf02 --- /dev/null +++ b/Build/patches/postgres-platform-variable-interpolation-php82-fix.diff @@ -0,0 +1,13 @@ +diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +index 7888030d78e..0c5be453fc5 100644 +--- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php ++++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +@@ -871,7 +871,7 @@ private function convertSingleBooleanValue($value, $callback) + return $callback(true); + } + +- throw new UnexpectedValueException("Unrecognized boolean literal '${value}'"); ++ throw new UnexpectedValueException(sprintf("Unrecognized boolean literal '%s'", $value)); + } + + /** diff --git a/Build/testing-docker/local/docker-compose.yml b/Build/testing-docker/local/docker-compose.yml index 6e0233cff7fbb4943ef0d77cc60d03a313818030..6df98f80ddd4bed9fc3c629181df37663cd20bdf 100644 --- a/Build/testing-docker/local/docker-compose.yml +++ b/Build/testing-docker/local/docker-compose.yml @@ -684,7 +684,12 @@ services: set -x fi composer config --unset platform.php; - composer update --no-progress --no-interaction; + if [ ${PHP_VERSION} == \"8.2\" ]; then + # @todo: Needed until prophecy (req by phpunit) allows PHP 8.2, https://github.com/phpspec/prophecy/issues/556 + composer update --no-progress --no-interaction --ignore-platform-req=php+; + else + composer update --no-progress --no-interaction; + fi composer dumpautoload; " @@ -703,7 +708,12 @@ services: set -x fi composer config platform.php ${PHP_VERSION}.0; - composer update --prefer-lowest --no-progress --no-interaction; + if [ ${PHP_VERSION} == \"8.2\" ]; then + # @todo: Needed until prophecy (req by phpunit) allows PHP 8.2, https://github.com/phpspec/prophecy/issues/556 + composer update --prefer-lowest --no-progress --no-interaction --ignore-platform-req=php+; + else + composer update --prefer-lowest --no-progress --no-interaction --ignore-platform-req=php+; + fi composer dumpautoload; " diff --git a/composer.json b/composer.json index 1376dfe1fdfdbbbccf60225580d2b9b746c5f604..da14d6c6e183ba4d8e063f48c0bcfc9744e3c91c 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ "allow-plugins": { "composer/package-versions-deprecated": true, "typo3/class-alias-loader": true, - "typo3/cms-composer-installers": true + "typo3/cms-composer-installers": true, + "cweagans/composer-patches": true } }, "require": { @@ -111,6 +112,7 @@ "codeception/module-webdriver": "^1.4.0", "composer/composer": "^2.2.12", "composer/package-versions-deprecated": "^1.11.99.4", + "cweagans/composer-patches": "^1.7.1", "friendsofphp/php-cs-fixer": "^3.12.0", "friendsoftypo3/phpstan-typo3": "^0.9.0", "jangregor/phpstan-prophecy": "^1.0", @@ -143,7 +145,9 @@ }, "branch-alias": { "dev-master": "11.5.x-dev" - } + }, + "composer-exit-on-patch-failure": "true", + "patches-file": "Build/patches/patches.json" }, "scripts": { "gerrit:setup": [ diff --git a/composer.lock b/composer.lock index 0e98a7ce447e49c9777765c09166721b1cfaa18b..1177182c675bda14d5a05908eac94121304c33f1 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": "413772291837560b6e82eb06c9c46f98", + "content-hash": "230cadcbb9ef9ec8d1067e60a50cf8eb", "packages": [ { "name": "bacon/bacon-qr-code", @@ -6421,6 +6421,54 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e9969cfc0796e6dea9b4e52f77f18e1065212871", + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "support": { + "issues": "https://github.com/cweagans/composer-patches/issues", + "source": "https://github.com/cweagans/composer-patches/tree/1.7.2" + }, + "time": "2022-01-25T19:21:20+00:00" + }, { "name": "friendsofphp/php-cs-fixer", "version": "v3.12.0", diff --git a/typo3/sysext/core/Tests/Acceptance/Application/InstallTool/UpgradeCest.php b/typo3/sysext/core/Tests/Acceptance/Application/InstallTool/UpgradeCest.php index 50feb469aa07df4bf4a1dee0943f9c3d8defc7f7..5c4d5ba6d78589483b850d9f72f3ce1474279274 100644 --- a/typo3/sysext/core/Tests/Acceptance/Application/InstallTool/UpgradeCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Application/InstallTool/UpgradeCest.php @@ -17,8 +17,11 @@ declare(strict_types=1); namespace TYPO3\CMS\Core\Tests\Acceptance\Application\InstallTool; +use Doctrine\DBAL\Platforms\MySqlPlatform; +use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester; use TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\ModalDialog; +use TYPO3\CMS\Core\Utility\GeneralUtility; class UpgradeCest extends AbstractCest { @@ -55,13 +58,44 @@ class UpgradeCest extends AbstractCest $I->amGoingTo('open the upgrade wizard and set charset to utf8'); $I->see('Upgrade Wizard', ModalDialog::$openedModalSelector); - $I->click('Set default charset to utf8', ModalDialog::$openedModalSelector); - $I->waitForText('Default connection database has been set to utf8', 5, ModalDialog::$openedModalSelector); - $I->see('No wizards are marked as done', ModalDialog::$openedModalSelector); + if ($this->shouldDefaultCharsetCheckBeChecked()) { + $I->click('Set default charset to utf8', ModalDialog::$openedModalSelector); + $I->waitForText('Default connection database has been set to utf8', 5, ModalDialog::$openedModalSelector); + } + + $I->see('No wizards are marked as done', ModalDialog::$openedModalSelector); $I->click('.t3js-modal-close'); } + /** + * Determine if we should check for the UTF8 default charset check in upgrade wizards + */ + protected function shouldDefaultCharsetCheckBeChecked(): bool + { + $connection = GeneralUtility::makeInstance(ConnectionPool::class) + ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME); + $isDefaultConnectionMysql = ($connection->getDatabasePlatform() instanceof MySqlPlatform); + if (!$isDefaultConnectionMysql) { + return false; + } + $queryBuilder = $connection->createQueryBuilder(); + $charset = (string)$queryBuilder->select('DEFAULT_CHARACTER_SET_NAME') + ->from('information_schema.SCHEMATA') + ->where( + $queryBuilder->expr()->eq( + 'SCHEMA_NAME', + $queryBuilder->createNamedParameter($connection->getDatabase(), \PDO::PARAM_STR) + ) + ) + ->setMaxResults(1) + ->executeQuery() + ->fetchOne(); + // check if database charset is utf-8, also allows utf8mb4 + $charsetOk = str_starts_with($charset, 'utf8'); + return !$charsetOk; + } + /** * @throws \Exception */