Skip to content

Commit

Permalink
Update CheckRequirements Command
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed Dec 6, 2024
1 parent 47320ce commit 223e379
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
16 changes: 12 additions & 4 deletions classes/UpgradeSelfCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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. <a class="link" href="">See the list of alterations.</a>');
$params = [
'[1]' => '<a class="" href="" target="">',
'[/1]' => '</a>',
];
$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 [
Expand All @@ -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. <a class="link" href="">See the list of alterations.</a>');
$params = [
'[1]' => '<a class="" href="" target="">',
'[/1]' => '</a>',
];
$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 [
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/Xml/ChecksumCompareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 223e379

Please sign in to comment.