From 223e379e400d9d7e07039b08d2cabea2b19e510f Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 5 Dec 2024 17:45:33 +0100 Subject: [PATCH] Update CheckRequirements Command --- .php-cs-fixer.dist.php | 3 ++- classes/UpgradeSelfCheck.php | 16 ++++++++++++---- tests/unit/Xml/ChecksumCompareTest.php | 7 +++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 49821e8e0..8524a2435 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -8,6 +8,7 @@ ->in(__DIR__) ->exclude('vendor') ->exclude('node_modules') - ->exclude('storybook/var/cache'); + ->exclude('storybook/var/cache') + ->exclude('tests/fixtures/checksum-compare'); return $config; diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 040edc484..47ea4bea0 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -327,9 +327,13 @@ public function getRequirementWording(int $requirement, bool $isWebVersion = fal case self::CORE_TEMPERED_FILES_LIST_NOT_EMPTY: if ($isWebVersion) { // TODO the link must be integrated when implementing the modal in the web part - $message = $this->translator->trans('Some core files have been altered, customization made on these files will be lost during the update. See the list of alterations.'); + $params = [ + '[1]' => '', + '[/1]' => '', + ]; + $message = $this->translator->trans('Some core files have been altered or removed. Any changes made to these files may be overwritten during the update. [1]See the list of alterations.[/1]', $params); } else { - $message = $this->translator->trans('Some core files have been altered, customization made on these files will be lost during the update.'); + $message = $this->translator->trans('Some core files have been altered or removed. Any changes made to these files may be overwritten during the update.'); } return [ @@ -339,9 +343,13 @@ public function getRequirementWording(int $requirement, bool $isWebVersion = fal case self::THEME_TEMPERED_FILES_LIST_NOT_EMPTY: if ($isWebVersion) { // TODO the link must be integrated when implementing the modal in the web part - $message = $this->translator->trans('Some theme files have been altered, customization made on these files will be lost during the update. See the list of alterations.'); + $params = [ + '[1]' => '', + '[/1]' => '', + ]; + $message = $this->translator->trans('Some theme files have been altered or removed. Any changes made to these files may be overwritten during the update. [1]See the list of alterations.[/1]', $params); } else { - $message = $this->translator->trans('Some theme files have been altered, customization made on these files will be lost during the update.'); + $message = $this->translator->trans('Some theme files have been altered or removed. Any changes made to these files may be overwritten during the update.'); } return [ diff --git a/tests/unit/Xml/ChecksumCompareTest.php b/tests/unit/Xml/ChecksumCompareTest.php index b961223b5..0dc67aeaf 100644 --- a/tests/unit/Xml/ChecksumCompareTest.php +++ b/tests/unit/Xml/ChecksumCompareTest.php @@ -31,6 +31,13 @@ class ChecksumCompareTest extends TestCase { + public function setUp() + { + if (PHP_VERSION_ID >= 80000) { + $this->markTestSkipped('An issue with this version of PHPUnit and PHP 8+ prevents this test to run.'); + } + } + public function testCompareReleases() { // Simplest test