diff --git a/Build/gitlab-ci/nightly/functional.yml b/Build/gitlab-ci/nightly/functional.yml index 04a86927ae6a..567dd6c340a5 100644 --- a/Build/gitlab-ci/nightly/functional.yml +++ b/Build/gitlab-ci/nightly/functional.yml @@ -1,4 +1,4 @@ -functional mariadb 10.10 php 8.3 max: +functional mariadb 10.10 php 8.4 max: stage: functional tags: - metal2 @@ -7,8 +7,8 @@ functional mariadb 10.10 php 8.3 max: - schedules parallel: 6 script: - - Build/Scripts/runTests.sh -s composerInstallMax -p 8.3 - - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.10 -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + - Build/Scripts/runTests.sh -s composerInstallMax -p 8.4 + - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.10 -p 8.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL functional mariadb 10.4 php 8.2 min: stage: functional tags: diff --git a/Build/gitlab-ci/pre-merge/functional.yml b/Build/gitlab-ci/pre-merge/functional.yml index 1ffe3f9c7c91..25508810bd20 100644 --- a/Build/gitlab-ci/pre-merge/functional.yml +++ b/Build/gitlab-ci/pre-merge/functional.yml @@ -11,7 +11,7 @@ functional mariadb 10.4 php 8.3 pre-merge: - Build/Scripts/runTests.sh -s composerInstall -p 8.3 - Build/Scripts/runTests.sh -s functional -d mariadb -i 10.4 -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL -functional postgres 10 php 8.2 pre-merge: +functional postgres 10 php 8.4 pre-merge: stage: main tags: - metal2 @@ -21,8 +21,8 @@ functional postgres 10 php 8.2 pre-merge: - main parallel: 10 script: - - Build/Scripts/runTests.sh -s composerInstall -p 8.2 - - Build/Scripts/runTests.sh -s functional -d postgres -i 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL + - Build/Scripts/runTests.sh -s composerInstall -p 8.4 + - Build/Scripts/runTests.sh -s functional -d postgres -i 10 -p 8.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL functional sqlite php 8.2 pre-merge: stage: main diff --git a/Build/patches/darylldoyle-svg-sanitizer-php-8.4.diff b/Build/patches/darylldoyle-svg-sanitizer-php-8.4.diff new file mode 100644 index 000000000000..a4c0cef6770c --- /dev/null +++ b/Build/patches/darylldoyle-svg-sanitizer-php-8.4.diff @@ -0,0 +1,13 @@ +diff --git a/src/Exceptions/NestingException.php b/src/Exceptions/NestingException.php +index 474b987..7acc842 100644 +--- a/src/Exceptions/NestingException.php ++++ b/src/Exceptions/NestingException.php +@@ -18,7 +18,7 @@ class NestingException extends \Exception + * @param Exception|null $previous + * @param \DOMElement|null $element + */ +- public function __construct($message = "", $code = 0, Exception $previous = null, \DOMElement $element = null) ++ public function __construct($message = "", $code = 0, ?Exception $previous = null, ?\DOMElement $element = null) + { + $this->element = $element; + parent::__construct($message, $code, $previous); diff --git a/Build/patches/patches.json b/Build/patches/patches.json index 0b9a3d85d706..0fb273ef95f1 100644 --- a/Build/patches/patches.json +++ b/Build/patches/patches.json @@ -2,6 +2,9 @@ "patches": { "firebase/php-jwt": { "firebase/php-jwt PHP 8.4": "Build/patches/firebase-php-jwt-572-php-8.4.diff" + }, + "enshrined/svg-sanitize": { + "darylldoyle/svg-sanitize PHP 8.4": "Build/patches/darylldoyle-svg-sanitizer-php-8.4.diff" } } } diff --git a/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/external.svg b/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/external.svg index cd190cb20038..e6b36669565e 100644 --- a/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/external.svg +++ b/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/external.svg @@ -1,4 +1,4 @@ - + diff --git a/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/svgOne.svg b/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/svgOne.svg index f543a84b5f32..0799159aac6b 100644 --- a/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/svgOne.svg +++ b/typo3/sysext/core/Tests/Functional/Resource/Fixtures/DirtySVG/svgOne.svg @@ -1,4 +1,4 @@ - + + diff --git a/typo3/sysext/core/Tests/Functional/Resource/Security/SvgSanitizerTest.php b/typo3/sysext/core/Tests/Functional/Resource/Security/SvgSanitizerTest.php index 00c04a68be56..a66640e09a02 100644 --- a/typo3/sysext/core/Tests/Functional/Resource/Security/SvgSanitizerTest.php +++ b/typo3/sysext/core/Tests/Functional/Resource/Security/SvgSanitizerTest.php @@ -54,9 +54,9 @@ public static function svgContentIsSanitizedDataProvider(): array public function svgContentIsSanitized(string $filePath, string $sanitizedFilePath): void { $sanitizer = new SvgSanitizer(); - self::assertStringEqualsFile( - $sanitizedFilePath, - $sanitizer->sanitizeContent(file_get_contents($filePath)) - ); + $sanitizedFileContent = file_get_contents($sanitizedFilePath); + // Align lowercase / uppercase "UTF-8" in files - Casing changed in PHP 8.4 generated XML. + $sanitizedFileContent = str_replace('utf-8', 'UTF-8', $sanitizedFileContent); + self::assertEquals($sanitizedFileContent, $sanitizer->sanitizeContent(file_get_contents($filePath))); } }