diff --git a/src/Validator/VersionPolicy/ForbidMinorUpdates.php b/src/Validator/VersionPolicy/ForbidMinorUpdates.php index 86327d4161137cf8f2f8e07bf7de5f9d7d8b8d7d..83e5cfe6de0965637587ab974942acf703d84e08 100644 --- a/src/Validator/VersionPolicy/ForbidMinorUpdates.php +++ b/src/Validator/VersionPolicy/ForbidMinorUpdates.php @@ -35,7 +35,7 @@ class ForbidMinorUpdates { if ($installed_minor !== $target_minor) { return [ - $this->t('Drupal cannot be automatically updated from its current version, @installed_version, to the recommended version, @target_version, because automatic updates from one minor version to another are not supported during cron.', [ + $this->t('Drupal cannot be automatically updated from @installed_version to @target_version because automatic updates from one minor version to another are not supported during cron.', [ '@installed_version' => $installed_version, '@target_version' => $target_version, ]), diff --git a/src/Validator/VersionPolicy/MajorVersionMatch.php b/src/Validator/VersionPolicy/MajorVersionMatch.php index 58709075b78e4d447547c14c4bd9a108ff76c502..378251ac1846dc03b875ecaca87b56fe4818562a 100644 --- a/src/Validator/VersionPolicy/MajorVersionMatch.php +++ b/src/Validator/VersionPolicy/MajorVersionMatch.php @@ -36,7 +36,7 @@ class MajorVersionMatch { if ($installed_major !== $target_major) { return [ - $this->t('Drupal cannot be automatically updated from its current version, @installed_version, to the recommended version, @target_version, because automatic updates from one major version to another are not supported.', [ + $this->t('Drupal cannot be automatically updated from @installed_version to @target_version because automatic updates from one major version to another are not supported.', [ '@installed_version' => $installed_version, '@target_version' => $target_version, ]), diff --git a/src/Validator/VersionPolicy/MinorUpdatesEnabled.php b/src/Validator/VersionPolicy/MinorUpdatesEnabled.php index 52f6fd80e19a3240b56d3e07c316331538ddffa1..6ce2042cab8dfc84745f5d3bfbb3eeb13f091d48 100644 --- a/src/Validator/VersionPolicy/MinorUpdatesEnabled.php +++ b/src/Validator/VersionPolicy/MinorUpdatesEnabled.php @@ -74,7 +74,7 @@ class MinorUpdatesEnabled implements ContainerInjectionInterface { if (!$minor_updates_allowed) { return [ - $this->t('Drupal cannot be automatically updated from its current version, @installed_version, to the recommended version, @target_version, because automatic updates from one minor version to another are not supported.', [ + $this->t('Drupal cannot be automatically updated from @installed_version to @target_version because automatic updates from one minor version to another are not supported.', [ '@installed_version' => $installed_version, '@target_version' => $target_version, ]), diff --git a/src/Validator/VersionPolicy/TargetSecurityRelease.php b/src/Validator/VersionPolicy/TargetSecurityRelease.php index 4ac64316a109929503a8d9b0efd2f00f58dd9240..b209e52b9b0043702cde93e2817a91498a746428 100644 --- a/src/Validator/VersionPolicy/TargetSecurityRelease.php +++ b/src/Validator/VersionPolicy/TargetSecurityRelease.php @@ -32,7 +32,7 @@ class TargetSecurityRelease { public function validate(string $installed_version, ?string $target_version, array $available_releases): array { if (!$available_releases[$target_version]->isSecurityRelease()) { return [ - $this->t('Drupal cannot be automatically updated during cron from its current version, @installed_version, to the recommended version, @target_version, because @target_version is not a security release.', [ + $this->t('Drupal cannot be automatically updated during cron from @installed_version to @target_version because @target_version is not a security release.', [ '@installed_version' => $installed_version, '@target_version' => $target_version, ]), diff --git a/src/Validator/VersionPolicy/TargetVersionStable.php b/src/Validator/VersionPolicy/TargetVersionStable.php index 787bd477d6af287f0579505cf95a7d218b417233..64d61473f0995ce0ccfc14c886dc67f317f230b2 100644 --- a/src/Validator/VersionPolicy/TargetVersionStable.php +++ b/src/Validator/VersionPolicy/TargetVersionStable.php @@ -34,7 +34,7 @@ class TargetVersionStable { if ($extra) { return [ - $this->t('Drupal cannot be automatically updated during cron to the recommended version, @target_version, because Automatic Updates only supports updating to stable versions during cron.', [ + $this->t('Drupal cannot be automatically updated during cron to @target_version, because Automatic Updates only supports updating to stable versions during cron.', [ '@target_version' => $target_version, ]), ]; diff --git a/tests/src/Kernel/ReadinessValidation/VersionPolicyValidatorTest.php b/tests/src/Kernel/ReadinessValidation/VersionPolicyValidatorTest.php index 15d01b7841c2845fe7b9bddbe05cc87b5bcf56b9..97bcf17920efb5d0fdca001c92736e1ad38b4afe 100644 --- a/tests/src/Kernel/ReadinessValidation/VersionPolicyValidatorTest.php +++ b/tests/src/Kernel/ReadinessValidation/VersionPolicyValidatorTest.php @@ -116,7 +116,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { [CronUpdater::SECURITY], [ $this->createValidationResult('9.8.1', '9.8.2', [ - 'Drupal cannot be automatically updated during cron from its current version, 9.8.1, to the recommended version, 9.8.2, because 9.8.2 is not a security release.', + 'Drupal cannot be automatically updated during cron from 9.8.1 to 9.8.2 because 9.8.2 is not a security release.', ]), ], ], @@ -236,7 +236,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { ['drupal' => '9.8.2'], [ $this->createValidationResult('8.9.1', '9.8.2', [ - 'Drupal cannot be automatically updated from its current version, 8.9.1, to the recommended version, 9.8.2, because automatic updates from one major version to another are not supported.', + 'Drupal cannot be automatically updated from 8.9.1 to 9.8.2 because automatic updates from one major version to another are not supported.', ]), ], ], @@ -273,7 +273,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { ['drupal' => '9.8.2'], [ $this->createValidationResult('9.8.1', '9.8.2', [ - 'Drupal cannot be automatically updated during cron from its current version, 9.8.1, to the recommended version, 9.8.2, because 9.8.2 is not a security release.', + 'Drupal cannot be automatically updated during cron from 9.8.1 to 9.8.2 because 9.8.2 is not a security release.', ]), ], ], @@ -296,7 +296,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { ['drupal' => '9.8.2'], [ $this->createValidationResult('9.7.9', '9.8.2', [ - 'Drupal cannot be automatically updated from its current version, 9.7.9, to the recommended version, 9.8.2, because automatic updates from one minor version to another are not supported during cron.', + 'Drupal cannot be automatically updated from 9.7.9 to 9.8.2 because automatic updates from one minor version to another are not supported during cron.', ]), ], ], @@ -308,7 +308,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { ['drupal' => '9.8.2'], [ $this->createValidationResult('9.7.9', '9.8.2', [ - 'Drupal cannot be automatically updated from its current version, 9.7.9, to the recommended version, 9.8.2, because automatic updates from one minor version to another are not supported.', + 'Drupal cannot be automatically updated from 9.7.9 to 9.8.2 because automatic updates from one minor version to another are not supported.', ]), ], ], @@ -341,7 +341,7 @@ class VersionPolicyValidatorTest extends AutomaticUpdatesKernelTestBase { ['drupal' => '9.8.1-beta1'], [ $this->createValidationResult('9.8.0', '9.8.1-beta1', [ - 'Drupal cannot be automatically updated during cron to the recommended version, 9.8.1-beta1, because Automatic Updates only supports updating to stable versions during cron.', + 'Drupal cannot be automatically updated during cron to 9.8.1-beta1, because Automatic Updates only supports updating to stable versions during cron.', ]), ], ], diff --git a/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php b/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php index 28cb73b9be032ff6d31b52ffd9f47e03dc6d8dfb..889c7614d23d06bc1f45ff93569e3898b456e0f4 100644 --- a/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php +++ b/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php @@ -41,32 +41,33 @@ class ForbidMinorUpdatesTest extends UnitTestCase { 'target version in older minor' => [ '9.8.0', '9.7.2', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 9.7.2, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 9.7.2 because automatic updates from one minor version to another are not supported during cron.'], ], + 'target version in newer minor' => [ '9.8.0', '9.9.2', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 9.9.2, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 9.9.2 because automatic updates from one minor version to another are not supported during cron.'], ], 'target version in older major' => [ '9.8.0', '8.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 8.8.0, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 8.8.0 because automatic updates from one minor version to another are not supported during cron.'], ], 'target version in newer major' => [ '9.8.0', '10.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 10.8.0, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 10.8.0 because automatic updates from one minor version to another are not supported during cron.'], ], 'target version in older major and minor' => [ '9.8.0', '8.9.9', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 8.9.9, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 8.9.9 because automatic updates from one minor version to another are not supported during cron.'], ], 'target version in newer major and minor' => [ '9.8.0', '10.9.2', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 10.9.2, because automatic updates from one minor version to another are not supported during cron.'], + ['Drupal cannot be automatically updated from 9.8.0 to 10.9.2 because automatic updates from one minor version to another are not supported during cron.'], ], ]; } diff --git a/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php b/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php index f7b10afc455ffef795f2fa4725b1e0ff55f38a3d..c01842ba0d73ee1b23e48d3a5c5088974f7fa3a3 100644 --- a/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php +++ b/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php @@ -51,12 +51,12 @@ class MajorVersionMatchTest extends UnitTestCase { 'target version in newer major' => [ '9.8.0', '10.0.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 10.0.0, because automatic updates from one major version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 10.0.0 because automatic updates from one major version to another are not supported.'], ], 'target version in older major' => [ '9.8.0', '8.9.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 8.9.0, because automatic updates from one major version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 8.9.0 because automatic updates from one major version to another are not supported.'], ], ]; } diff --git a/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php b/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php index be9616a7f1701f3501067895321e496f80e78f56..89579dc2df136e7cd01e2ef672903dbaea9f7708 100644 --- a/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php +++ b/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php @@ -51,7 +51,7 @@ class MinorUpdatesEnabledTest extends UnitTestCase { FALSE, '9.8.0', '9.9.2', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 9.9.2, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 9.9.2 because automatic updates from one minor version to another are not supported.'], ], 'target version in newer minor, minor updates allowed' => [ TRUE, @@ -75,7 +75,7 @@ class MinorUpdatesEnabledTest extends UnitTestCase { FALSE, '9.8.0', '9.7.2', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 9.7.2, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 9.7.2 because automatic updates from one minor version to another are not supported.'], ], 'target version in older minor, minor updates allowed' => [ TRUE, @@ -87,25 +87,25 @@ class MinorUpdatesEnabledTest extends UnitTestCase { FALSE, '9.8.0', '8.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 8.8.0, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 8.8.0 because automatic updates from one minor version to another are not supported.'], ], 'target version in older major, minor updates allowed' => [ FALSE, '9.8.0', '8.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 8.8.0, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 8.8.0 because automatic updates from one minor version to another are not supported.'], ], 'target version in newer major, minor updates forbidden' => [ FALSE, '9.8.0', '10.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 10.8.0, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 10.8.0 because automatic updates from one minor version to another are not supported.'], ], 'target version in newer major, minor updates allowed' => [ FALSE, '9.8.0', '10.8.0', - ['Drupal cannot be automatically updated from its current version, 9.8.0, to the recommended version, 10.8.0, because automatic updates from one minor version to another are not supported.'], + ['Drupal cannot be automatically updated from 9.8.0 to 10.8.0 because automatic updates from one minor version to another are not supported.'], ], ]; } diff --git a/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php b/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php index 386a8e4fdddfad392f0df0c015b4ecbb308b2107..da1e31e7f92bfb261f264f59b1e6112112db1b6f 100644 --- a/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php +++ b/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php @@ -45,7 +45,7 @@ class TargetSecurityReleaseTest extends UnitTestCase { 'version' => '9.8.1', ]), ], - ['Drupal cannot be automatically updated during cron from its current version, 9.8.0, to the recommended version, 9.8.1, because 9.8.1 is not a security release.'], + ['Drupal cannot be automatically updated during cron from 9.8.0 to 9.8.1 because 9.8.1 is not a security release.'], ], ]; } diff --git a/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php b/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php index 81fd98f44ac5c8c94c9be1bca07d83db4c0c32af..ef6f3e2a82a1eaeace709ba4b02cd0d0738ae585 100644 --- a/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php +++ b/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php @@ -29,19 +29,19 @@ class TargetVersionStableTest extends UnitTestCase { ], 'dev target version' => [ '9.9.0-dev', - ['Drupal cannot be automatically updated during cron to the recommended version, 9.9.0-dev, because Automatic Updates only supports updating to stable versions during cron.'], + ['Drupal cannot be automatically updated during cron to 9.9.0-dev, because Automatic Updates only supports updating to stable versions during cron.'], ], 'alpha target version' => [ '9.9.0-alpha3', - ['Drupal cannot be automatically updated during cron to the recommended version, 9.9.0-alpha3, because Automatic Updates only supports updating to stable versions during cron.'], + ['Drupal cannot be automatically updated during cron to 9.9.0-alpha3, because Automatic Updates only supports updating to stable versions during cron.'], ], 'beta target version' => [ '9.9.0-beta7', - ['Drupal cannot be automatically updated during cron to the recommended version, 9.9.0-beta7, because Automatic Updates only supports updating to stable versions during cron.'], + ['Drupal cannot be automatically updated during cron to 9.9.0-beta7, because Automatic Updates only supports updating to stable versions during cron.'], ], 'release candidate target version' => [ '9.9.0-rc2', - ['Drupal cannot be automatically updated during cron to the recommended version, 9.9.0-rc2, because Automatic Updates only supports updating to stable versions during cron.'], + ['Drupal cannot be automatically updated during cron to 9.9.0-rc2, because Automatic Updates only supports updating to stable versions during cron.'], ], ]; }