diff --git a/package_manager/package_manager.services.yml b/package_manager/package_manager.services.yml index f5e04442d0d43f9b48c55d34e6e6c0f87c5245f3..7480aaae798c0165513bc8d5cbfd78d6181ea9e1 100644 --- a/package_manager/package_manager.services.yml +++ b/package_manager/package_manager.services.yml @@ -77,21 +77,21 @@ services: # Validators. package_manager.validator.composer_executable: - class: Drupal\package_manager\EventSubscriber\ComposerExecutableValidator + class: Drupal\package_manager\Validator\ComposerExecutableValidator arguments: - '@package_manager.composer_runner' - '@string_translation' tags: - { name: event_subscriber } package_manager.validator.disk_space: - class: Drupal\package_manager\EventSubscriber\DiskSpaceValidator + class: Drupal\package_manager\Validator\DiskSpaceValidator arguments: - '@package_manager.path_locator' - '@string_translation' tags: - { name: event_subscriber } package_manager.validator.pending_updates: - class: Drupal\package_manager\EventSubscriber\PendingUpdatesValidator + class: Drupal\package_manager\Validator\PendingUpdatesValidator arguments: - '%app.root%' - '@update.post_update_registry' @@ -99,7 +99,7 @@ services: tags: - { name: event_subscriber } package_manager.validator.lock_file: - class: Drupal\package_manager\EventSubscriber\LockFileValidator + class: Drupal\package_manager\Validator\LockFileValidator arguments: - '@state' - '@package_manager.path_locator' @@ -107,7 +107,7 @@ services: tags: - { name: event_subscriber } package_manager.validator.file_system: - class: Drupal\package_manager\EventSubscriber\WritableFileSystemValidator + class: Drupal\package_manager\Validator\WritableFileSystemValidator arguments: - '@package_manager.path_locator' - '%app.root%' @@ -115,7 +115,7 @@ services: tags: - { name: event_subscriber } package_manager.validator.composer_settings: - class: Drupal\package_manager\EventSubscriber\ComposerSettingsValidator + class: Drupal\package_manager\Validator\ComposerSettingsValidator arguments: - '@string_translation' tags: diff --git a/package_manager/src/EventSubscriber/ComposerExecutableValidator.php b/package_manager/src/Validator/ComposerExecutableValidator.php similarity index 98% rename from package_manager/src/EventSubscriber/ComposerExecutableValidator.php rename to package_manager/src/Validator/ComposerExecutableValidator.php index f91e852930321300c2dd5b4067736165ff3dafc1..2ed03cd378fa2e3f8b9e84c2efe80397f6348e2e 100644 --- a/package_manager/src/EventSubscriber/ComposerExecutableValidator.php +++ b/package_manager/src/Validator/ComposerExecutableValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreOperationStageEvent; diff --git a/package_manager/src/EventSubscriber/ComposerSettingsValidator.php b/package_manager/src/Validator/ComposerSettingsValidator.php similarity index 96% rename from package_manager/src/EventSubscriber/ComposerSettingsValidator.php rename to package_manager/src/Validator/ComposerSettingsValidator.php index 64c7249564e83520e06f7cc857311859ebaf640d..0ad1c7c254f7b92923b39d74b8c85567e351d3ca 100644 --- a/package_manager/src/EventSubscriber/ComposerSettingsValidator.php +++ b/package_manager/src/Validator/ComposerSettingsValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationInterface; diff --git a/package_manager/src/EventSubscriber/DiskSpaceValidator.php b/package_manager/src/Validator/DiskSpaceValidator.php similarity index 99% rename from package_manager/src/EventSubscriber/DiskSpaceValidator.php rename to package_manager/src/Validator/DiskSpaceValidator.php index c54a653052092cb6f5f6de96292ac8178fea9a0b..31441f86255a5490d9cdeab822aba94608316c9e 100644 --- a/package_manager/src/EventSubscriber/DiskSpaceValidator.php +++ b/package_manager/src/Validator/DiskSpaceValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreOperationStageEvent; diff --git a/package_manager/src/EventSubscriber/LockFileValidator.php b/package_manager/src/Validator/LockFileValidator.php similarity index 98% rename from package_manager/src/EventSubscriber/LockFileValidator.php rename to package_manager/src/Validator/LockFileValidator.php index dab3d8d298bbff2e71830ca55218b8cff4bfad8a..daf807e60139f27619680fc20fde7671e7d1c540 100644 --- a/package_manager/src/EventSubscriber/LockFileValidator.php +++ b/package_manager/src/Validator/LockFileValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\Core\State\StateInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; diff --git a/package_manager/src/EventSubscriber/PendingUpdatesValidator.php b/package_manager/src/Validator/PendingUpdatesValidator.php similarity index 97% rename from package_manager/src/EventSubscriber/PendingUpdatesValidator.php rename to package_manager/src/Validator/PendingUpdatesValidator.php index 53cbc7420633dc26bc0485072ae11b0ede02ce77..16062a98a6198d7ab4d2e4b0c94cef623671fc13 100644 --- a/package_manager/src/EventSubscriber/PendingUpdatesValidator.php +++ b/package_manager/src/Validator/PendingUpdatesValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreOperationStageEvent; diff --git a/package_manager/src/EventSubscriber/PreOperationStageValidatorInterface.php b/package_manager/src/Validator/PreOperationStageValidatorInterface.php similarity index 91% rename from package_manager/src/EventSubscriber/PreOperationStageValidatorInterface.php rename to package_manager/src/Validator/PreOperationStageValidatorInterface.php index a48ff5127f42a5e5ce0c5af75b4c4e4319479013..a30bfbcda53117347a12b55bde192303868b734c 100644 --- a/package_manager/src/EventSubscriber/PreOperationStageValidatorInterface.php +++ b/package_manager/src/Validator/PreOperationStageValidatorInterface.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\package_manager\Event\PreOperationStageEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/package_manager/src/EventSubscriber/WritableFileSystemValidator.php b/package_manager/src/Validator/WritableFileSystemValidator.php similarity index 97% rename from package_manager/src/EventSubscriber/WritableFileSystemValidator.php rename to package_manager/src/Validator/WritableFileSystemValidator.php index 95bc5d1104deac380383c2c28d996d6f928c1320..24ccc241867fa46634e5ea9c089124b57907f208 100644 --- a/package_manager/src/EventSubscriber/WritableFileSystemValidator.php +++ b/package_manager/src/Validator/WritableFileSystemValidator.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\package_manager\EventSubscriber; +namespace Drupal\package_manager\Validator; use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreOperationStageEvent; diff --git a/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php b/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php index bc57b4fa75a7b65aff5a4fca754e66d48c5c8191..12b4fe415ca89cc14febdada697392017b38e5a0 100644 --- a/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php +++ b/package_manager/tests/src/Kernel/ComposerExecutableValidatorTest.php @@ -3,14 +3,14 @@ namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; -use Drupal\package_manager\EventSubscriber\ComposerExecutableValidator; +use Drupal\package_manager\Validator\ComposerExecutableValidator; use Drupal\package_manager\ValidationResult; use PhpTuf\ComposerStager\Exception\IOException; use PhpTuf\ComposerStager\Infrastructure\Process\ExecutableFinderInterface; use Prophecy\Argument; /** - * @covers \Drupal\package_manager\EventSubscriber\ComposerExecutableValidator + * @covers \Drupal\package_manager\Validator\ComposerExecutableValidator * * @group package_manager */ @@ -120,7 +120,7 @@ class ComposerExecutableValidatorTest extends PackageManagerKernelTestBase { // $arguments, and we know exactly what that will contain: an array of // command arguments for Composer, and the validator object. ->will(function (array $arguments) use ($reported_version) { - /** @var \Drupal\package_manager\EventSubscriber\ComposerExecutableValidator $validator */ + /** @var \Drupal\package_manager\Validator\ComposerExecutableValidator $validator */ $validator = $arguments[1]; // Invoke the validator (which, as mentioned, is a callback function), // with fake output from `composer --version`. It should try to tease a diff --git a/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php b/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php index d964c09ba97aaddc166d85896f7377b862930622..af6f12bde624b4aa748455f318d0b71ac8b8388f 100644 --- a/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php +++ b/package_manager/tests/src/Kernel/ComposerSettingsValidatorTest.php @@ -7,7 +7,7 @@ use Drupal\package_manager\Exception\StageValidationException; use Drupal\package_manager\ValidationResult; /** - * @covers \Drupal\package_manager\EventSubscriber\ComposerSettingsValidator + * @covers \Drupal\package_manager\Validator\ComposerSettingsValidator * * @group package_manager */ diff --git a/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php b/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php index 7b1f406859f93fcc1792f1e9986d06dd13133ac4..a972c7e8a417910106e55072b7842a82e0c06cf7 100644 --- a/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php +++ b/package_manager/tests/src/Kernel/DiskSpaceValidatorTest.php @@ -7,7 +7,7 @@ use Drupal\package_manager\ValidationResult; use Drupal\Component\Utility\Bytes; /** - * @covers \Drupal\package_manager\EventSubscriber\DiskSpaceValidator + * @covers \Drupal\package_manager\Validator\DiskSpaceValidator * * @group package_manager */ diff --git a/package_manager/tests/src/Kernel/LockFileValidatorTest.php b/package_manager/tests/src/Kernel/LockFileValidatorTest.php index ed02f41c3a0d0ea39def56a8b9b9c5b09d42e63d..c6cfeb535d4c043213216be339947822b2781aed 100644 --- a/package_manager/tests/src/Kernel/LockFileValidatorTest.php +++ b/package_manager/tests/src/Kernel/LockFileValidatorTest.php @@ -5,11 +5,11 @@ namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreApplyEvent; use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreRequireEvent; -use Drupal\package_manager\EventSubscriber\LockFileValidator; +use Drupal\package_manager\Validator\LockFileValidator; use Drupal\package_manager\ValidationResult; /** - * @coversDefaultClass \Drupal\package_manager\EventSubscriber\LockFileValidator + * @coversDefaultClass \Drupal\package_manager\Validator\LockFileValidator * * @group package_manager */ diff --git a/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php b/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php index aa26879c9f8928218b9d3a80dff559815d8dff96..25d08dac8b6a71e4cc8f67f011e8e7e842c9ba6f 100644 --- a/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php +++ b/package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php @@ -5,7 +5,7 @@ namespace Drupal\Tests\package_manager\Kernel; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\KernelTests\KernelTestBase; use Drupal\package_manager\Event\StageEvent; -use Drupal\package_manager\EventSubscriber\DiskSpaceValidator; +use Drupal\package_manager\Validator\DiskSpaceValidator; use Drupal\package_manager\Exception\StageException; use Drupal\package_manager\Exception\StageValidationException; use Drupal\package_manager\PathLocator; diff --git a/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php b/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php index ea90029ca28aa001c035cb076bf868158b580dca..35605045ea2b3b4b50816f875400338e6ec8c85d 100644 --- a/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php +++ b/package_manager/tests/src/Kernel/PendingUpdatesValidatorTest.php @@ -6,7 +6,7 @@ use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\ValidationResult; /** - * @covers \Drupal\package_manager\EventSubscriber\PendingUpdatesValidator + * @covers \Drupal\package_manager\Validator\PendingUpdatesValidator * * @group package_manager */ diff --git a/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php b/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php index a2dc72efd24883429fae552e6c89a06126100637..40e3f683c898dc594ddf70dfd905e1e775daa835 100644 --- a/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php +++ b/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php @@ -3,7 +3,7 @@ namespace Drupal\Tests\package_manager\Kernel; use Drupal\package_manager\Event\PreCreateEvent; -use Drupal\package_manager\EventSubscriber\WritableFileSystemValidator; +use Drupal\package_manager\Validator\WritableFileSystemValidator; use Drupal\package_manager\ValidationResult; use Drupal\Core\DependencyInjection\ContainerBuilder; @@ -15,7 +15,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder; * * @see \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::assertReadOnlyFileSystemError() * - * @covers \Drupal\package_manager\EventSubscriber\WritableFileSystemValidator + * @covers \Drupal\package_manager\Validator\WritableFileSystemValidator * * @group package_manager */ diff --git a/src/Validator/PackageManagerReadinessCheck.php b/src/Validator/PackageManagerReadinessCheck.php index b7754315f4890be9d27312c489caeabcf4c166f2..1a6bb48a80f91b6500dbaf43a4baf92fe48d1a88 100644 --- a/src/Validator/PackageManagerReadinessCheck.php +++ b/src/Validator/PackageManagerReadinessCheck.php @@ -3,7 +3,7 @@ namespace Drupal\automatic_updates\Validator; use Drupal\automatic_updates\Event\ReadinessCheckEvent; -use Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface; +use Drupal\package_manager\Validator\PreOperationStageValidatorInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** @@ -18,14 +18,14 @@ class PackageManagerReadinessCheck implements EventSubscriberInterface { /** * The validator to run. * - * @var \Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface + * @var \Drupal\package_manager\Validator\PreOperationStageValidatorInterface */ protected $validator; /** * Constructs a PackageManagerReadinessCheck object. * - * @param \Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface $validator + * @param \Drupal\package_manager\Validator\PreOperationStageValidatorInterface $validator * The Package Manager validator to run during readiness checking. */ public function __construct(PreOperationStageValidatorInterface $validator) { diff --git a/tests/src/Kernel/ReadinessValidation/PackageManagerReadinessChecksTest.php b/tests/src/Kernel/ReadinessValidation/PackageManagerReadinessChecksTest.php index 19dff1be7ccff4d60f9616bc5c590a965e9a719a..7b2fd421b6ba79c9f1b4fafd2d0995584fa93df9 100644 --- a/tests/src/Kernel/ReadinessValidation/PackageManagerReadinessChecksTest.php +++ b/tests/src/Kernel/ReadinessValidation/PackageManagerReadinessChecksTest.php @@ -4,7 +4,7 @@ namespace Drupal\Tests\automatic_updates\Kernel\ReadinessValidation; use Drupal\automatic_updates\Event\ReadinessCheckEvent; use Drupal\Core\DependencyInjection\ContainerBuilder; -use Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface; +use Drupal\package_manager\Validator\PreOperationStageValidatorInterface; use Drupal\Tests\automatic_updates\Kernel\AutomaticUpdatesKernelTestBase; use Prophecy\Argument;