From 1de79bcfa43da5bbafbc24a607530ea52190f99b Mon Sep 17 00:00:00 2001 From: omkar podey <58183-omkar.podey@users.noreply.drupalcode.org> Date: Tue, 6 Dec 2022 20:57:04 +0000 Subject: [PATCH] Issue #3323565 by omkar.podey: Add 'declare(strict_types = 1)' in tests + recheck test modules + check *.module files --- .../tests/src/Build/ModuleUpdateTest.php | 2 ++ .../tests/src/Functional/UpdaterFormTest.php | 2 ++ .../tests/src/Kernel/ExtensionUpdaterTest.php | 2 ++ .../Kernel/Validator/UpdateReleaseValidatorTest.php | 2 ++ .../updated_module/1.1.0/src/PostApplySubscriber.php | 2 ++ package_manager/tests/src/Build/PackageInstallTest.php | 2 ++ package_manager/tests/src/Build/PackageUpdateTest.php | 2 ++ .../src/Functional/FailureMarkerRequirementTest.php | 2 ++ .../src/Kernel/ComposerExecutableValidatorTest.php | 2 ++ .../tests/src/Kernel/ComposerPatchesValidatorTest.php | 2 ++ .../tests/src/Kernel/ComposerSettingsValidatorTest.php | 2 ++ .../tests/src/Kernel/ComposerUtilityTest.php | 2 ++ .../tests/src/Kernel/CorePackageManifestTest.php | 2 ++ .../tests/src/Kernel/DiskSpaceValidatorTest.php | 2 ++ .../src/Kernel/DuplicateInfoFileValidatorTest.php | 2 ++ .../src/Kernel/EnvironmentSupportValidatorTest.php | 2 ++ .../tests/src/Kernel/ExecutableFinderTest.php | 2 ++ package_manager/tests/src/Kernel/FailureMarkerTest.php | 2 ++ .../tests/src/Kernel/FakeSiteFixtureTest.php | 2 ++ .../tests/src/Kernel/FileSyncerFactoryTest.php | 2 ++ .../tests/src/Kernel/FixtureUtilityTraitTest.php | 2 ++ .../tests/src/Kernel/LockFileValidatorTest.php | 2 ++ .../tests/src/Kernel/MultisiteValidatorTest.php | 2 ++ .../Kernel/OverwriteExistingPackagesValidatorTest.php | 2 ++ .../tests/src/Kernel/PathExcluder/GitExcluderTest.php | 2 ++ .../Kernel/PathExcluder/NodeModulesExcluderTest.php | 2 ++ .../PathExcluder/SiteConfigurationExcluderTest.php | 2 ++ .../src/Kernel/PathExcluder/SiteFilesExcluderTest.php | 2 ++ .../Kernel/PathExcluder/SqliteDatabaseExcluderTest.php | 2 ++ .../src/Kernel/PathExcluder/TestSiteExcluderTest.php | 2 ++ .../PathExcluder/VendorHardeningExcluderTest.php | 2 ++ .../tests/src/Kernel/PendingUpdatesValidatorTest.php | 2 ++ package_manager/tests/src/Kernel/ProjectInfoTest.php | 6 ++++-- package_manager/tests/src/Kernel/ServicesTest.php | 2 ++ .../tests/src/Kernel/SettingsValidatorTest.php | 2 ++ package_manager/tests/src/Kernel/StageEventsTest.php | 2 ++ .../tests/src/Kernel/StageOwnershipTest.php | 4 +++- package_manager/tests/src/Kernel/StageTest.php | 6 ++++-- .../tests/src/Kernel/StageValidationExceptionTest.php | 2 ++ .../tests/src/Kernel/StagedDBUpdateValidatorTest.php | 2 ++ .../tests/src/Kernel/StatusCheckTraitTest.php | 2 ++ .../tests/src/Kernel/SupportedReleaseValidatorTest.php | 2 ++ .../tests/src/Kernel/SymlinkValidatorTest.php | 2 ++ .../src/Kernel/WritableFileSystemValidatorTest.php | 2 ++ .../tests/src/Kernel/XdebugValidatorTest.php | 2 ++ package_manager/tests/src/Unit/ComposerUtilityTest.php | 2 ++ .../tests/src/Unit/InstalledPackagesDataTest.php | 2 ++ package_manager/tests/src/Unit/PathLocatorTest.php | 2 ++ package_manager/tests/src/Unit/ProcessFactoryTest.php | 2 ++ .../tests/src/Unit/RequireEventTraitTest.php | 2 ++ .../tests/src/Unit/ValidationResultTest.php | 2 ++ .../automatic_updates_test/src/Datetime/TestTime.php | 2 ++ .../src/EventSubscriber/RequestTimeRecorder.php | 2 ++ .../src/EventSubscriber/TestSubscriber1.php | 2 ++ .../src/EventSubscriber/TestSubscriber2.php | 2 ++ tests/src/Build/CoreUpdateTest.php | 2 ++ tests/src/Functional/AvailableUpdatesReportTest.php | 2 ++ tests/src/Functional/DeprecatedRoutesTest.php | 2 ++ tests/src/Functional/HelpPageTest.php | 2 ++ tests/src/Functional/StatusCheckTest.php | 2 ++ tests/src/Functional/UpdateLockTest.php | 2 ++ tests/src/Functional/UpdatePathTest.php | 2 ++ .../UpdaterFormNoRecommendedReleaseMessageTest.php | 2 ++ tests/src/Functional/UpdaterFormTest.php | 2 ++ tests/src/Kernel/CronUpdaterTest.php | 10 ++++++---- tests/src/Kernel/ReadinessCheckTest.php | 2 ++ tests/src/Kernel/ReleaseChooserTest.php | 2 ++ .../Kernel/StatusCheck/CronFrequencyValidatorTest.php | 2 ++ .../src/Kernel/StatusCheck/CronServerValidatorTest.php | 6 ++++-- .../ScaffoldFilePermissionsValidatorTest.php | 2 ++ .../StatusCheck/StagedDatabaseUpdateValidatorTest.php | 10 ++++++---- .../Kernel/StatusCheck/StagedProjectsValidatorTest.php | 2 ++ .../Kernel/StatusCheck/StatusCheckFailureEmailTest.php | 2 ++ tests/src/Kernel/StatusCheck/StatusCheckerTest.php | 2 ++ .../VersionPolicy/SupportedBranchInstalledTest.php | 2 ++ .../Kernel/StatusCheck/VersionPolicyValidatorTest.php | 2 ++ tests/src/Kernel/StatusCheck/XdebugValidatorTest.php | 6 +++++- tests/src/Kernel/UpdaterTest.php | 2 ++ tests/src/Kernel/ValidationResultDisplayTraitTest.php | 2 ++ tests/src/Unit/LegacyVersionUtilityTest.php | 2 ++ tests/src/Unit/VersionPolicy/ForbidDevSnapshotTest.php | 2 ++ tests/src/Unit/VersionPolicy/ForbidDowngradeTest.php | 2 ++ .../src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php | 2 ++ tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php | 2 ++ .../src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php | 2 ++ .../Unit/VersionPolicy/StableReleaseInstalledTest.php | 2 ++ .../Unit/VersionPolicy/TargetSecurityReleaseTest.php | 2 ++ .../VersionPolicy/TargetVersionInstallableTest.php | 2 ++ .../src/Unit/VersionPolicy/TargetVersionStableTest.php | 2 ++ 89 files changed, 196 insertions(+), 16 deletions(-) diff --git a/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php b/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php index f0c8425f05..9354509868 100644 --- a/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php +++ b/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates_extensions\Build; use Drupal\Tests\automatic_updates\Build\UpdateTestBase; diff --git a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php index f6966cc691..ebacbd0bfb 100644 --- a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php +++ b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates_extensions\Functional; use Drupal\automatic_updates_test\EventSubscriber\TestSubscriber1; diff --git a/automatic_updates_extensions/tests/src/Kernel/ExtensionUpdaterTest.php b/automatic_updates_extensions/tests/src/Kernel/ExtensionUpdaterTest.php index c23333401d..78f55b2742 100644 --- a/automatic_updates_extensions/tests/src/Kernel/ExtensionUpdaterTest.php +++ b/automatic_updates_extensions/tests/src/Kernel/ExtensionUpdaterTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates_extensions\Kernel; use Drupal\automatic_updates\Exception\UpdateException; diff --git a/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php b/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php index 80a3103093..c075b8e389 100644 --- a/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php +++ b/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates_extensions\Kernel\Validator; use Drupal\package_manager\LegacyVersionUtility; diff --git a/package_manager/tests/fixtures/updated_module/1.1.0/src/PostApplySubscriber.php b/package_manager/tests/fixtures/updated_module/1.1.0/src/PostApplySubscriber.php index 94092531f1..83f1283d14 100644 --- a/package_manager/tests/fixtures/updated_module/1.1.0/src/PostApplySubscriber.php +++ b/package_manager/tests/fixtures/updated_module/1.1.0/src/PostApplySubscriber.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\updated_module; use Drupal\package_manager\Event\PostApplyEvent; diff --git a/package_manager/tests/src/Build/PackageInstallTest.php b/package_manager/tests/src/Build/PackageInstallTest.php index aa2167d32d..814d73c7ff 100644 --- a/package_manager/tests/src/Build/PackageInstallTest.php +++ b/package_manager/tests/src/Build/PackageInstallTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Build; /** diff --git a/package_manager/tests/src/Build/PackageUpdateTest.php b/package_manager/tests/src/Build/PackageUpdateTest.php index 1547b23833..44f88d60d6 100644 --- a/package_manager/tests/src/Build/PackageUpdateTest.php +++ b/package_manager/tests/src/Build/PackageUpdateTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Build; /** diff --git a/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php b/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php index 9da316ec67..1f5f59c3a2 100644 --- a/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php +++ b/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Functional; use Drupal\Core\StringTranslation\StringTranslationTrait; diff --git a/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php b/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php index 7e5a90ed6d..ad10772346 100644 --- a/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php +++ b/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php b/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php index 142b716c42..c9d854c2db 100644 --- a/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php +++ b/package_manager/tests/src/Kernel/ComposerPatchesValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Composer\Json\JsonFile; diff --git a/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php b/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php index 0ba92940de..751a11563c 100644 --- a/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php +++ b/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Component\Serialization\Json; diff --git a/package_manager/tests/src/Kernel/ComposerUtilityTest.php b/package_manager/tests/src/Kernel/ComposerUtilityTest.php index 210eafd8a1..dbb649817b 100644 --- a/package_manager/tests/src/Kernel/ComposerUtilityTest.php +++ b/package_manager/tests/src/Kernel/ComposerUtilityTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\KernelTests\KernelTestBase; diff --git a/package_manager/tests/src/Kernel/CorePackageManifestTest.php b/package_manager/tests/src/Kernel/CorePackageManifestTest.php index ce501f2815..e5ededf42a 100644 --- a/package_manager/tests/src/Kernel/CorePackageManifestTest.php +++ b/package_manager/tests/src/Kernel/CorePackageManifestTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Component\Serialization\Json; diff --git a/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php b/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php index 523b2d53df..2d78ef27cf 100644 --- a/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php +++ b/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php b/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php index 15eddc5be3..88e18a0df7 100644 --- a/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php +++ b/package_manager/tests/src/Kernel/DuplicateInfoFileValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Exception\StageValidationException; diff --git a/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php b/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php index 7ebb78ab26..f20e597543 100644 --- a/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php +++ b/package_manager/tests/src/Kernel/EnvironmentSupportValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/ExecutableFinderTest.php b/package_manager/tests/src/Kernel/ExecutableFinderTest.php index 82b92afc68..5a4c4818a5 100644 --- a/package_manager/tests/src/Kernel/ExecutableFinderTest.php +++ b/package_manager/tests/src/Kernel/ExecutableFinderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Kernel/FailureMarkerTest.php b/package_manager/tests/src/Kernel/FailureMarkerTest.php index e00345c6c4..97708dabb0 100644 --- a/package_manager/tests/src/Kernel/FailureMarkerTest.php +++ b/package_manager/tests/src/Kernel/FailureMarkerTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\StringTranslation\StringTranslationTrait; diff --git a/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php b/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php index af8facb645..b5501c7fcc 100644 --- a/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php +++ b/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\ComposerUtility; diff --git a/package_manager/tests/src/Kernel/FileSyncerFactoryTest.php b/package_manager/tests/src/Kernel/FileSyncerFactoryTest.php index e851c81cb5..14e9e7da9e 100644 --- a/package_manager/tests/src/Kernel/FileSyncerFactoryTest.php +++ b/package_manager/tests/src/Kernel/FileSyncerFactoryTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\KernelTests\KernelTestBase; diff --git a/package_manager/tests/src/Kernel/FixtureUtilityTraitTest.php b/package_manager/tests/src/Kernel/FixtureUtilityTraitTest.php index e95037eef0..1d60428024 100644 --- a/package_manager/tests/src/Kernel/FixtureUtilityTraitTest.php +++ b/package_manager/tests/src/Kernel/FixtureUtilityTraitTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait; diff --git a/package_manager/tests/src/Kernel/LockFileValidatorTest.php b/package_manager/tests/src/Kernel/LockFileValidatorTest.php index f4ff94bb13..4460d4ee3a 100644 --- a/package_manager/tests/src/Kernel/LockFileValidatorTest.php +++ b/package_manager/tests/src/Kernel/LockFileValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreApplyEvent; diff --git a/package_manager/tests/src/Kernel/MultisiteValidatorTest.php b/package_manager/tests/src/Kernel/MultisiteValidatorTest.php index 5573fc7e15..7db26d1a85 100644 --- a/package_manager/tests/src/Kernel/MultisiteValidatorTest.php +++ b/package_manager/tests/src/Kernel/MultisiteValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php b/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php index b589d68998..1423075556 100644 --- a/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php +++ b/package_manager/tests/src/Kernel/OverwriteExistingPackagesValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Exception\StageValidationException; diff --git a/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php index 0dc8a8c6ba..5aebbac926 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; diff --git a/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php index 2317185307..7b8bd2daf2 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/NodeModulesExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; diff --git a/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php index 933b8f959f..5826b46f0c 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php index db680b143f..8f43f9f143 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; diff --git a/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php index 6dd086d8f2..386c028d28 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/SqliteDatabaseExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Core\Database\Connection; diff --git a/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php index 88e780f77d..9dec2fb94f 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/TestSiteExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; diff --git a/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php b/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php index 88a1202749..ff81f4f246 100644 --- a/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php +++ b/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel\PathExcluder; use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase; diff --git a/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php b/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php index 1308c2c17e..ec565b3283 100644 --- a/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php +++ b/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/ProjectInfoTest.php b/package_manager/tests/src/Kernel/ProjectInfoTest.php index 8bb079875e..b1c727d9a2 100644 --- a/package_manager/tests/src/Kernel/ProjectInfoTest.php +++ b/package_manager/tests/src/Kernel/ProjectInfoTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\Logger\RfcLogLevel; @@ -174,8 +176,8 @@ class ProjectInfoTest extends PackageManagerKernelTestBase { // the last checked time. $this->assertSame(123, $state->get('update.last_check')); - $this->assertTrue($logger->hasRecordThatContains('Invalid project format: Array', RfcLogLevel::ERROR)); - $this->assertTrue($logger->hasRecordThatContains('[name] => AAA 8.x-5.x', RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecordThatContains('Invalid project format: Array', (string) RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecordThatContains('[name] => AAA 8.x-5.x', (string) RfcLogLevel::ERROR)); } /** diff --git a/package_manager/tests/src/Kernel/ServicesTest.php b/package_manager/tests/src/Kernel/ServicesTest.php index bac20c469b..33e3cc7287 100644 --- a/package_manager/tests/src/Kernel/ServicesTest.php +++ b/package_manager/tests/src/Kernel/ServicesTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\KernelTests\KernelTestBase; diff --git a/package_manager/tests/src/Kernel/SettingsValidatorTest.php b/package_manager/tests/src/Kernel/SettingsValidatorTest.php index c737cad34d..49fd7f819b 100644 --- a/package_manager/tests/src/Kernel/SettingsValidatorTest.php +++ b/package_manager/tests/src/Kernel/SettingsValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/StageEventsTest.php b/package_manager/tests/src/Kernel/StageEventsTest.php index 37a7d5aab3..849727786c 100644 --- a/package_manager/tests/src/Kernel/StageEventsTest.php +++ b/package_manager/tests/src/Kernel/StageEventsTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Kernel/StageOwnershipTest.php b/package_manager/tests/src/Kernel/StageOwnershipTest.php index 28b084db0c..3416d76fdb 100644 --- a/package_manager/tests/src/Kernel/StageOwnershipTest.php +++ b/package_manager/tests/src/Kernel/StageOwnershipTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\File\FileSystem; @@ -307,7 +309,7 @@ class StageOwnershipTest extends PackageManagerKernelTestBase { str_contains($record['context']['%path'], $dir) ); }; - $this->assertTrue($logger->hasRecordThatPasses($predicate, RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecordThatPasses($predicate, (string) RfcLogLevel::ERROR)); } } diff --git a/package_manager/tests/src/Kernel/StageTest.php b/package_manager/tests/src/Kernel/StageTest.php index 0713fd4195..66c7551f1f 100644 --- a/package_manager/tests/src/Kernel/StageTest.php +++ b/package_manager/tests/src/Kernel/StageTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Component\Datetime\Time; @@ -415,8 +417,8 @@ class StageTest extends PackageManagerKernelTestBase { $this->container->get('tempstore.shared'), $this->container->get('datetime.time') ); - $this->assertTrue($logger->hasRecord('Drupal\package_manager\Stage::TEMPSTORE_METADATA_KEY is overridden by ' . TestStageOverriddenConstants::class . '. This is deprecated because it can cause errors or other unexpected behavior. It is strongly recommended to stop overriding this constant. See https://www.drupal.org/node/3317450 for more information.', RfcLogLevel::ERROR)); - $this->assertTrue($logger->hasRecord('Drupal\package_manager\Stage::TEMPSTORE_LOCK_KEY is overridden by ' . TestStageOverriddenConstants::class . '. This is deprecated because it can cause errors or other unexpected behavior. It is strongly recommended to stop overriding this constant. See https://www.drupal.org/node/3317450 for more information.', RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecord('Drupal\package_manager\Stage::TEMPSTORE_METADATA_KEY is overridden by ' . TestStageOverriddenConstants::class . '. This is deprecated because it can cause errors or other unexpected behavior. It is strongly recommended to stop overriding this constant. See https://www.drupal.org/node/3317450 for more information.', (string) RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecord('Drupal\package_manager\Stage::TEMPSTORE_LOCK_KEY is overridden by ' . TestStageOverriddenConstants::class . '. This is deprecated because it can cause errors or other unexpected behavior. It is strongly recommended to stop overriding this constant. See https://www.drupal.org/node/3317450 for more information.', (string) RfcLogLevel::ERROR)); } /** diff --git a/package_manager/tests/src/Kernel/StageValidationExceptionTest.php b/package_manager/tests/src/Kernel/StageValidationExceptionTest.php index d905f23214..0b68618f25 100644 --- a/package_manager/tests/src/Kernel/StageValidationExceptionTest.php +++ b/package_manager/tests/src/Kernel/StageValidationExceptionTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php b/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php index ede72c4874..dd65d36dba 100644 --- a/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php +++ b/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\ValidationResult; diff --git a/package_manager/tests/src/Kernel/StatusCheckTraitTest.php b/package_manager/tests/src/Kernel/StatusCheckTraitTest.php index 5173eab284..bc529e04df 100644 --- a/package_manager/tests/src/Kernel/StatusCheckTraitTest.php +++ b/package_manager/tests/src/Kernel/StatusCheckTraitTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\CollectIgnoredPathsEvent; diff --git a/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php b/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php index 523241bf82..539d753b28 100644 --- a/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php +++ b/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreApplyEvent; diff --git a/package_manager/tests/src/Kernel/SymlinkValidatorTest.php b/package_manager/tests/src/Kernel/SymlinkValidatorTest.php index 351af83ee2..ae5441a6d3 100644 --- a/package_manager/tests/src/Kernel/SymlinkValidatorTest.php +++ b/package_manager/tests/src/Kernel/SymlinkValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php b/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php index bbef90d1dd..ddc8c4876a 100644 --- a/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php +++ b/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; diff --git a/package_manager/tests/src/Kernel/XdebugValidatorTest.php b/package_manager/tests/src/Kernel/XdebugValidatorTest.php index 43ce87e044..b0e3b581f3 100644 --- a/package_manager/tests/src/Kernel/XdebugValidatorTest.php +++ b/package_manager/tests/src/Kernel/XdebugValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\ValidationResult; diff --git a/package_manager/tests/src/Unit/ComposerUtilityTest.php b/package_manager/tests/src/Unit/ComposerUtilityTest.php index 54107de9d9..7a004680bd 100644 --- a/package_manager/tests/src/Unit/ComposerUtilityTest.php +++ b/package_manager/tests/src/Unit/ComposerUtilityTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Composer\Package\PackageInterface; diff --git a/package_manager/tests/src/Unit/InstalledPackagesDataTest.php b/package_manager/tests/src/Unit/InstalledPackagesDataTest.php index 566e11502f..c7957bf7e4 100644 --- a/package_manager/tests/src/Unit/InstalledPackagesDataTest.php +++ b/package_manager/tests/src/Unit/InstalledPackagesDataTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Composer\Autoload\ClassLoader; diff --git a/package_manager/tests/src/Unit/PathLocatorTest.php b/package_manager/tests/src/Unit/PathLocatorTest.php index 5bf9b0dd04..4f4bc6ff92 100644 --- a/package_manager/tests/src/Unit/PathLocatorTest.php +++ b/package_manager/tests/src/Unit/PathLocatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Drupal\Core\DependencyInjection\ContainerBuilder; diff --git a/package_manager/tests/src/Unit/ProcessFactoryTest.php b/package_manager/tests/src/Unit/ProcessFactoryTest.php index d0d646d756..a6d1c4fd07 100644 --- a/package_manager/tests/src/Unit/ProcessFactoryTest.php +++ b/package_manager/tests/src/Unit/ProcessFactoryTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Drupal\package_manager\ProcessFactory; diff --git a/package_manager/tests/src/Unit/RequireEventTraitTest.php b/package_manager/tests/src/Unit/RequireEventTraitTest.php index b28ecc5317..f477749b85 100644 --- a/package_manager/tests/src/Unit/RequireEventTraitTest.php +++ b/package_manager/tests/src/Unit/RequireEventTraitTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Drupal\Tests\UnitTestCase; diff --git a/package_manager/tests/src/Unit/ValidationResultTest.php b/package_manager/tests/src/Unit/ValidationResultTest.php index cdf0a6dfaa..ccf221a8c3 100644 --- a/package_manager/tests/src/Unit/ValidationResultTest.php +++ b/package_manager/tests/src/Unit/ValidationResultTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\package_manager\Unit; use Drupal\package_manager\ValidationResult; diff --git a/tests/modules/automatic_updates_test/src/Datetime/TestTime.php b/tests/modules/automatic_updates_test/src/Datetime/TestTime.php index cea3504f4d..6048d6b65f 100644 --- a/tests/modules/automatic_updates_test/src/Datetime/TestTime.php +++ b/tests/modules/automatic_updates_test/src/Datetime/TestTime.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\automatic_updates_test\Datetime; use Drupal\Component\Datetime\Time; diff --git a/tests/modules/automatic_updates_test/src/EventSubscriber/RequestTimeRecorder.php b/tests/modules/automatic_updates_test/src/EventSubscriber/RequestTimeRecorder.php index 805c40f746..4a1c1e82ea 100644 --- a/tests/modules/automatic_updates_test/src/EventSubscriber/RequestTimeRecorder.php +++ b/tests/modules/automatic_updates_test/src/EventSubscriber/RequestTimeRecorder.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\automatic_updates_test\EventSubscriber; use Drupal\Component\Datetime\TimeInterface; diff --git a/tests/modules/automatic_updates_test/src/EventSubscriber/TestSubscriber1.php b/tests/modules/automatic_updates_test/src/EventSubscriber/TestSubscriber1.php index 428134123d..18f39c105f 100644 --- a/tests/modules/automatic_updates_test/src/EventSubscriber/TestSubscriber1.php +++ b/tests/modules/automatic_updates_test/src/EventSubscriber/TestSubscriber1.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\automatic_updates_test\EventSubscriber; use Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber; diff --git a/tests/modules/automatic_updates_test2/src/EventSubscriber/TestSubscriber2.php b/tests/modules/automatic_updates_test2/src/EventSubscriber/TestSubscriber2.php index 907cbde305..8a0ab81148 100644 --- a/tests/modules/automatic_updates_test2/src/EventSubscriber/TestSubscriber2.php +++ b/tests/modules/automatic_updates_test2/src/EventSubscriber/TestSubscriber2.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\automatic_updates_test2\EventSubscriber; use Drupal\automatic_updates_test\EventSubscriber\TestSubscriber1; diff --git a/tests/src/Build/CoreUpdateTest.php b/tests/src/Build/CoreUpdateTest.php index 1355482a19..97be7f9b61 100644 --- a/tests/src/Build/CoreUpdateTest.php +++ b/tests/src/Build/CoreUpdateTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Build; use Drupal\Composer\Composer; diff --git a/tests/src/Functional/AvailableUpdatesReportTest.php b/tests/src/Functional/AvailableUpdatesReportTest.php index 0ab736335f..e11d6c8678 100644 --- a/tests/src/Functional/AvailableUpdatesReportTest.php +++ b/tests/src/Functional/AvailableUpdatesReportTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\Core\Url; diff --git a/tests/src/Functional/DeprecatedRoutesTest.php b/tests/src/Functional/DeprecatedRoutesTest.php index b52c55d95d..ff89fd57f4 100644 --- a/tests/src/Functional/DeprecatedRoutesTest.php +++ b/tests/src/Functional/DeprecatedRoutesTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\Core\Url; diff --git a/tests/src/Functional/HelpPageTest.php b/tests/src/Functional/HelpPageTest.php index 0cf65bef43..bfe81a41b1 100644 --- a/tests/src/Functional/HelpPageTest.php +++ b/tests/src/Functional/HelpPageTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\Tests\BrowserTestBase; diff --git a/tests/src/Functional/StatusCheckTest.php b/tests/src/Functional/StatusCheckTest.php index f3ce4e2487..84db352a40 100644 --- a/tests/src/Functional/StatusCheckTest.php +++ b/tests/src/Functional/StatusCheckTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Behat\Mink\Element\NodeElement; diff --git a/tests/src/Functional/UpdateLockTest.php b/tests/src/Functional/UpdateLockTest.php index c68c25b2e2..720caba240 100644 --- a/tests/src/Functional/UpdateLockTest.php +++ b/tests/src/Functional/UpdateLockTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\package_manager_bypass\Stager; diff --git a/tests/src/Functional/UpdatePathTest.php b/tests/src/Functional/UpdatePathTest.php index a0e9f3b6ae..2f5139acb8 100644 --- a/tests/src/Functional/UpdatePathTest.php +++ b/tests/src/Functional/UpdatePathTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\automatic_updates\StatusCheckMailer; diff --git a/tests/src/Functional/UpdaterFormNoRecommendedReleaseMessageTest.php b/tests/src/Functional/UpdaterFormNoRecommendedReleaseMessageTest.php index 6d8d7bbcc7..d599045691 100644 --- a/tests/src/Functional/UpdaterFormNoRecommendedReleaseMessageTest.php +++ b/tests/src/Functional/UpdaterFormNoRecommendedReleaseMessageTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; /** diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php index 424325cb9e..f92049fa0a 100644 --- a/tests/src/Functional/UpdaterFormTest.php +++ b/tests/src/Functional/UpdaterFormTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Functional; use Drupal\automatic_updates_test\Datetime\TestTime; diff --git a/tests/src/Kernel/CronUpdaterTest.php b/tests/src/Kernel/CronUpdaterTest.php index 5cfa075ff7..9078970cf6 100644 --- a/tests/src/Kernel/CronUpdaterTest.php +++ b/tests/src/Kernel/CronUpdaterTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel; use Drupal\automatic_updates\CronUpdater; @@ -51,7 +53,7 @@ class CronUpdaterTest extends AutomaticUpdatesKernelTestBase { /** * The test logger. * - * @var \Psr\Log\Test\TestLogger + * @var ColinODell\PsrTestLogger\TestLogger */ private $logger; @@ -156,7 +158,7 @@ class CronUpdaterTest extends AutomaticUpdatesKernelTestBase { $form = $form_builder->buildForm(UpdateSettingsForm::class, $form_state); // Ensure that the version ranges in the setting's description, which are // computed dynamically, look correct. - $this->assertStringContainsString('Automatic updates are only supported for 9.8.x versions of Drupal core. Drupal 9.8 will receive security updates until 9.10.0 is released.', $form['automatic_updates_cron']['#description']); + $this->assertStringContainsString('Automatic updates are only supported for 9.8.x versions of Drupal core. Drupal 9.8 will receive security updates until 9.10.0 is released.', (string) $form['automatic_updates_cron']['#description']); $form_state->setValue('automatic_updates_cron', $setting); $form_builder->submitForm(UpdateSettingsForm::class, $form_state); @@ -301,7 +303,7 @@ class CronUpdaterTest extends AutomaticUpdatesKernelTestBase { $this->assertTrue($updater->isAvailable()); $this->container->get('cron')->run(); - $logged_by_updater = $this->logger->hasRecord($expected_log_message, RfcLogLevel::ERROR); + $logged_by_updater = $this->logger->hasRecord($expected_log_message, (string) RfcLogLevel::ERROR); // To check if the exception was logged by the main cron service, we need // to set up a special predicate, because exceptions logged by cron are // always formatted in a particular way that we don't control. But the @@ -314,7 +316,7 @@ class CronUpdaterTest extends AutomaticUpdatesKernelTestBase { } return FALSE; }; - $logged_by_cron = $cron_logger->hasRecordThatPasses($predicate, RfcLogLevel::ERROR); + $logged_by_cron = $cron_logger->hasRecordThatPasses($predicate, (string) RfcLogLevel::ERROR); // If a pre-destroy event flags a validation error, it's handled like any // other event (logged by the cron updater, but not the main cron service). diff --git a/tests/src/Kernel/ReadinessCheckTest.php b/tests/src/Kernel/ReadinessCheckTest.php index 24f23749bf..c7d1cf2ec9 100644 --- a/tests/src/Kernel/ReadinessCheckTest.php +++ b/tests/src/Kernel/ReadinessCheckTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel; use Drupal\automatic_updates\Event\ReadinessCheckEvent; diff --git a/tests/src/Kernel/ReleaseChooserTest.php b/tests/src/Kernel/ReleaseChooserTest.php index 08340f1d69..c6a720bf15 100644 --- a/tests/src/Kernel/ReleaseChooserTest.php +++ b/tests/src/Kernel/ReleaseChooserTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel; use Drupal\Core\Extension\ExtensionVersion; diff --git a/tests/src/Kernel/StatusCheck/CronFrequencyValidatorTest.php b/tests/src/Kernel/StatusCheck/CronFrequencyValidatorTest.php index 693478a9b4..7009c95702 100644 --- a/tests/src/Kernel/StatusCheck/CronFrequencyValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/CronFrequencyValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; diff --git a/tests/src/Kernel/StatusCheck/CronServerValidatorTest.php b/tests/src/Kernel/StatusCheck/CronServerValidatorTest.php index 13f525cc88..fcac9f57e6 100644 --- a/tests/src/Kernel/StatusCheck/CronServerValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/CronServerValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; @@ -111,10 +113,10 @@ class CronServerValidatorTest extends AutomaticUpdatesKernelTestBase { $this->container->get('cron')->run(); if ($expected_results) { $error = new StageValidationException($expected_results); - $this->assertTrue($logger->hasRecord($error->getMessage(), RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecord($error->getMessage(), (string) RfcLogLevel::ERROR)); } else { - $this->assertFalse($logger->hasRecords(RfcLogLevel::ERROR)); + $this->assertFalse($logger->hasRecords((string) RfcLogLevel::ERROR)); } } } diff --git a/tests/src/Kernel/StatusCheck/ScaffoldFilePermissionsValidatorTest.php b/tests/src/Kernel/StatusCheck/ScaffoldFilePermissionsValidatorTest.php index 8a7ec47697..d5466717d4 100644 --- a/tests/src/Kernel/StatusCheck/ScaffoldFilePermissionsValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/ScaffoldFilePermissionsValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\package_manager\Exception\StageValidationException; diff --git a/tests/src/Kernel/StatusCheck/StagedDatabaseUpdateValidatorTest.php b/tests/src/Kernel/StatusCheck/StagedDatabaseUpdateValidatorTest.php index db2ced0f1b..21a7114310 100644 --- a/tests/src/Kernel/StatusCheck/StagedDatabaseUpdateValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/StagedDatabaseUpdateValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\Core\Logger\RfcLogLevel; @@ -92,7 +94,7 @@ class StagedDatabaseUpdateValidatorTest extends AutomaticUpdatesKernelTestBase { */ public function testNoUpdates(): void { $this->container->get('cron')->run(); - $this->assertFalse($this->logger->hasRecords(RfcLogLevel::ERROR)); + $this->assertFalse($this->logger->hasRecords((string) RfcLogLevel::ERROR)); } /** @@ -115,7 +117,7 @@ class StagedDatabaseUpdateValidatorTest extends AutomaticUpdatesKernelTestBase { $this->container->get('cron')->run(); $expected_message = "The update cannot proceed because possible database updates have been detected in the following extensions.\nSystem\nStark\n"; - $this->assertTrue($this->logger->hasRecord($expected_message, RfcLogLevel::ERROR)); + $this->assertTrue($this->logger->hasRecord($expected_message, (string) RfcLogLevel::ERROR)); } /** @@ -138,7 +140,7 @@ class StagedDatabaseUpdateValidatorTest extends AutomaticUpdatesKernelTestBase { $this->container->get('cron')->run(); $expected_message = "The update cannot proceed because possible database updates have been detected in the following extensions.\nSystem\nStark\n"; - $this->assertTrue($this->logger->hasRecord($expected_message, RfcLogLevel::ERROR)); + $this->assertTrue($this->logger->hasRecord($expected_message, (string) RfcLogLevel::ERROR)); } /** @@ -163,7 +165,7 @@ class StagedDatabaseUpdateValidatorTest extends AutomaticUpdatesKernelTestBase { $this->container->get('cron')->run(); $expected_message = "The update cannot proceed because possible database updates have been detected in the following extensions.\nSystem\nStark\n"; - $this->assertTrue($this->logger->hasRecord($expected_message, RfcLogLevel::ERROR)); + $this->assertTrue($this->logger->hasRecord($expected_message, (string) RfcLogLevel::ERROR)); } } diff --git a/tests/src/Kernel/StatusCheck/StagedProjectsValidatorTest.php b/tests/src/Kernel/StatusCheck/StagedProjectsValidatorTest.php index fcad516f00..8c648a0e80 100644 --- a/tests/src/Kernel/StatusCheck/StagedProjectsValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/StagedProjectsValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\package_manager\Event\PreApplyEvent; diff --git a/tests/src/Kernel/StatusCheck/StatusCheckFailureEmailTest.php b/tests/src/Kernel/StatusCheck/StatusCheckFailureEmailTest.php index d69c1e6021..b6e37b0173 100644 --- a/tests/src/Kernel/StatusCheck/StatusCheckFailureEmailTest.php +++ b/tests/src/Kernel/StatusCheck/StatusCheckFailureEmailTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; diff --git a/tests/src/Kernel/StatusCheck/StatusCheckerTest.php b/tests/src/Kernel/StatusCheck/StatusCheckerTest.php index 566800e9bf..4199491448 100644 --- a/tests/src/Kernel/StatusCheck/StatusCheckerTest.php +++ b/tests/src/Kernel/StatusCheck/StatusCheckerTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; diff --git a/tests/src/Kernel/StatusCheck/VersionPolicy/SupportedBranchInstalledTest.php b/tests/src/Kernel/StatusCheck/VersionPolicy/SupportedBranchInstalledTest.php index 30fe297f8c..40aa0738d2 100644 --- a/tests/src/Kernel/StatusCheck/VersionPolicy/SupportedBranchInstalledTest.php +++ b/tests/src/Kernel/StatusCheck/VersionPolicy/SupportedBranchInstalledTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\SupportedBranchInstalled; diff --git a/tests/src/Kernel/StatusCheck/VersionPolicyValidatorTest.php b/tests/src/Kernel/StatusCheck/VersionPolicyValidatorTest.php index 515b0d75b6..827a30ffe6 100644 --- a/tests/src/Kernel/StatusCheck/VersionPolicyValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/VersionPolicyValidatorTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; diff --git a/tests/src/Kernel/StatusCheck/XdebugValidatorTest.php b/tests/src/Kernel/StatusCheck/XdebugValidatorTest.php index 5327b101a6..a7006fe850 100644 --- a/tests/src/Kernel/StatusCheck/XdebugValidatorTest.php +++ b/tests/src/Kernel/StatusCheck/XdebugValidatorTest.php @@ -1,9 +1,12 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel\StatusCheck; use Drupal\automatic_updates\CronUpdater; use Drupal\Core\Logger\RfcLogLevel; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\package_manager\ValidationResult; use Drupal\Tests\automatic_updates\Kernel\AutomaticUpdatesKernelTestBase; use Drupal\Tests\package_manager\Traits\PackageManagerBypassTestTrait; @@ -17,6 +20,7 @@ use ColinODell\PsrTestLogger\TestLogger; class XdebugValidatorTest extends AutomaticUpdatesKernelTestBase { use PackageManagerBypassTestTrait; + use StringTranslationTrait; /** * {@inheritdoc} @@ -70,7 +74,7 @@ class XdebugValidatorTest extends AutomaticUpdatesKernelTestBase { $this->container->get('cron')->run(); $this->assertUpdateStagedTimes(0); - $this->assertTrue($logger->hasRecordThatMatches("/$message/", RfcLogLevel::ERROR)); + $this->assertTrue($logger->hasRecordThatMatches("/$message/", (string) RfcLogLevel::ERROR)); } } diff --git a/tests/src/Kernel/UpdaterTest.php b/tests/src/Kernel/UpdaterTest.php index 2b365a60fd..ffa95dfef5 100644 --- a/tests/src/Kernel/UpdaterTest.php +++ b/tests/src/Kernel/UpdaterTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel; use Drupal\automatic_updates\Exception\UpdateException; diff --git a/tests/src/Kernel/ValidationResultDisplayTraitTest.php b/tests/src/Kernel/ValidationResultDisplayTraitTest.php index 319be3b893..ee2b4bfdbe 100644 --- a/tests/src/Kernel/ValidationResultDisplayTraitTest.php +++ b/tests/src/Kernel/ValidationResultDisplayTraitTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Kernel; use Drupal\automatic_updates\Validation\ValidationResultDisplayTrait; diff --git a/tests/src/Unit/LegacyVersionUtilityTest.php b/tests/src/Unit/LegacyVersionUtilityTest.php index 782602c8db..b304dcafd1 100644 --- a/tests/src/Unit/LegacyVersionUtilityTest.php +++ b/tests/src/Unit/LegacyVersionUtilityTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit; use Drupal\package_manager\LegacyVersionUtility; diff --git a/tests/src/Unit/VersionPolicy/ForbidDevSnapshotTest.php b/tests/src/Unit/VersionPolicy/ForbidDevSnapshotTest.php index 4ce40968b8..a819d961c4 100644 --- a/tests/src/Unit/VersionPolicy/ForbidDevSnapshotTest.php +++ b/tests/src/Unit/VersionPolicy/ForbidDevSnapshotTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\ForbidDevSnapshot; diff --git a/tests/src/Unit/VersionPolicy/ForbidDowngradeTest.php b/tests/src/Unit/VersionPolicy/ForbidDowngradeTest.php index 249cd81ee9..6de5d39087 100644 --- a/tests/src/Unit/VersionPolicy/ForbidDowngradeTest.php +++ b/tests/src/Unit/VersionPolicy/ForbidDowngradeTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\ForbidDowngrade; diff --git a/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php b/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php index 0e8e687ead..9cba4f1d15 100644 --- a/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php +++ b/tests/src/Unit/VersionPolicy/ForbidMinorUpdatesTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\ForbidMinorUpdates; diff --git a/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php b/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php index a24262ad6d..db1f718b1b 100644 --- a/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php +++ b/tests/src/Unit/VersionPolicy/MajorVersionMatchTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\MajorVersionMatch; diff --git a/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php b/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php index 35442d4650..9059ef64a9 100644 --- a/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php +++ b/tests/src/Unit/VersionPolicy/MinorUpdatesEnabledTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\MinorUpdatesEnabled; diff --git a/tests/src/Unit/VersionPolicy/StableReleaseInstalledTest.php b/tests/src/Unit/VersionPolicy/StableReleaseInstalledTest.php index 2f85f79149..de34f4b194 100644 --- a/tests/src/Unit/VersionPolicy/StableReleaseInstalledTest.php +++ b/tests/src/Unit/VersionPolicy/StableReleaseInstalledTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\StableReleaseInstalled; diff --git a/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php b/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php index 1b7570ff06..97d047161c 100644 --- a/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php +++ b/tests/src/Unit/VersionPolicy/TargetSecurityReleaseTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\TargetSecurityRelease; diff --git a/tests/src/Unit/VersionPolicy/TargetVersionInstallableTest.php b/tests/src/Unit/VersionPolicy/TargetVersionInstallableTest.php index 4bcb764a12..42fd26d568 100644 --- a/tests/src/Unit/VersionPolicy/TargetVersionInstallableTest.php +++ b/tests/src/Unit/VersionPolicy/TargetVersionInstallableTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\TargetVersionInstallable; diff --git a/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php b/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php index d42fcd0315..28de42037c 100644 --- a/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php +++ b/tests/src/Unit/VersionPolicy/TargetVersionStableTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types = 1); + namespace Drupal\Tests\automatic_updates\Unit\VersionPolicy; use Drupal\automatic_updates\Validator\VersionPolicy\TargetVersionStable; -- GitLab