Skip to content
Snippets Groups Projects
Commit 5bd1882e authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3258065 by phenaproxima: Create package_manager Validator namespace

parent 577d5237
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 28 deletions
...@@ -77,21 +77,21 @@ services: ...@@ -77,21 +77,21 @@ services:
# Validators. # Validators.
package_manager.validator.composer_executable: package_manager.validator.composer_executable:
class: Drupal\package_manager\EventSubscriber\ComposerExecutableValidator class: Drupal\package_manager\Validator\ComposerExecutableValidator
arguments: arguments:
- '@package_manager.composer_runner' - '@package_manager.composer_runner'
- '@string_translation' - '@string_translation'
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.disk_space: package_manager.validator.disk_space:
class: Drupal\package_manager\EventSubscriber\DiskSpaceValidator class: Drupal\package_manager\Validator\DiskSpaceValidator
arguments: arguments:
- '@package_manager.path_locator' - '@package_manager.path_locator'
- '@string_translation' - '@string_translation'
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.pending_updates: package_manager.validator.pending_updates:
class: Drupal\package_manager\EventSubscriber\PendingUpdatesValidator class: Drupal\package_manager\Validator\PendingUpdatesValidator
arguments: arguments:
- '%app.root%' - '%app.root%'
- '@update.post_update_registry' - '@update.post_update_registry'
...@@ -99,7 +99,7 @@ services: ...@@ -99,7 +99,7 @@ services:
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.lock_file: package_manager.validator.lock_file:
class: Drupal\package_manager\EventSubscriber\LockFileValidator class: Drupal\package_manager\Validator\LockFileValidator
arguments: arguments:
- '@state' - '@state'
- '@package_manager.path_locator' - '@package_manager.path_locator'
...@@ -107,7 +107,7 @@ services: ...@@ -107,7 +107,7 @@ services:
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.file_system: package_manager.validator.file_system:
class: Drupal\package_manager\EventSubscriber\WritableFileSystemValidator class: Drupal\package_manager\Validator\WritableFileSystemValidator
arguments: arguments:
- '@package_manager.path_locator' - '@package_manager.path_locator'
- '%app.root%' - '%app.root%'
...@@ -115,7 +115,7 @@ services: ...@@ -115,7 +115,7 @@ services:
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.composer_settings: package_manager.validator.composer_settings:
class: Drupal\package_manager\EventSubscriber\ComposerSettingsValidator class: Drupal\package_manager\Validator\ComposerSettingsValidator
arguments: arguments:
- '@string_translation' - '@string_translation'
tags: tags:
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\Event\PreOperationStageEvent; use Drupal\package_manager\Event\PreOperationStageEvent;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\Core\StringTranslation\TranslationInterface;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\Event\PreOperationStageEvent; use Drupal\package_manager\Event\PreOperationStageEvent;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\Core\State\StateInterface; use Drupal\Core\State\StateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\StringTranslationTrait;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\Event\PreOperationStageEvent; use Drupal\package_manager\Event\PreOperationStageEvent;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\package_manager\Event\PreOperationStageEvent; use Drupal\package_manager\Event\PreOperationStageEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......
<?php <?php
namespace Drupal\package_manager\EventSubscriber; namespace Drupal\package_manager\Validator;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\Event\PreOperationStageEvent; use Drupal\package_manager\Event\PreOperationStageEvent;
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
namespace Drupal\Tests\package_manager\Kernel; namespace Drupal\Tests\package_manager\Kernel;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\EventSubscriber\ComposerExecutableValidator; use Drupal\package_manager\Validator\ComposerExecutableValidator;
use Drupal\package_manager\ValidationResult; use Drupal\package_manager\ValidationResult;
use PhpTuf\ComposerStager\Exception\IOException; use PhpTuf\ComposerStager\Exception\IOException;
use PhpTuf\ComposerStager\Infrastructure\Process\ExecutableFinderInterface; use PhpTuf\ComposerStager\Infrastructure\Process\ExecutableFinderInterface;
use Prophecy\Argument; use Prophecy\Argument;
/** /**
* @covers \Drupal\package_manager\EventSubscriber\ComposerExecutableValidator * @covers \Drupal\package_manager\Validator\ComposerExecutableValidator
* *
* @group package_manager * @group package_manager
*/ */
...@@ -120,7 +120,7 @@ class ComposerExecutableValidatorTest extends PackageManagerKernelTestBase { ...@@ -120,7 +120,7 @@ class ComposerExecutableValidatorTest extends PackageManagerKernelTestBase {
// $arguments, and we know exactly what that will contain: an array of // $arguments, and we know exactly what that will contain: an array of
// command arguments for Composer, and the validator object. // command arguments for Composer, and the validator object.
->will(function (array $arguments) use ($reported_version) { ->will(function (array $arguments) use ($reported_version) {
/** @var \Drupal\package_manager\EventSubscriber\ComposerExecutableValidator $validator */ /** @var \Drupal\package_manager\Validator\ComposerExecutableValidator $validator */
$validator = $arguments[1]; $validator = $arguments[1];
// Invoke the validator (which, as mentioned, is a callback function), // Invoke the validator (which, as mentioned, is a callback function),
// with fake output from `composer --version`. It should try to tease a // with fake output from `composer --version`. It should try to tease a
......
...@@ -7,7 +7,7 @@ use Drupal\package_manager\Exception\StageValidationException; ...@@ -7,7 +7,7 @@ use Drupal\package_manager\Exception\StageValidationException;
use Drupal\package_manager\ValidationResult; use Drupal\package_manager\ValidationResult;
/** /**
* @covers \Drupal\package_manager\EventSubscriber\ComposerSettingsValidator * @covers \Drupal\package_manager\Validator\ComposerSettingsValidator
* *
* @group package_manager * @group package_manager
*/ */
......
...@@ -7,7 +7,7 @@ use Drupal\package_manager\ValidationResult; ...@@ -7,7 +7,7 @@ use Drupal\package_manager\ValidationResult;
use Drupal\Component\Utility\Bytes; use Drupal\Component\Utility\Bytes;
/** /**
* @covers \Drupal\package_manager\EventSubscriber\DiskSpaceValidator * @covers \Drupal\package_manager\Validator\DiskSpaceValidator
* *
* @group package_manager * @group package_manager
*/ */
......
...@@ -5,11 +5,11 @@ namespace Drupal\Tests\package_manager\Kernel; ...@@ -5,11 +5,11 @@ namespace Drupal\Tests\package_manager\Kernel;
use Drupal\package_manager\Event\PreApplyEvent; use Drupal\package_manager\Event\PreApplyEvent;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\Event\PreRequireEvent; use Drupal\package_manager\Event\PreRequireEvent;
use Drupal\package_manager\EventSubscriber\LockFileValidator; use Drupal\package_manager\Validator\LockFileValidator;
use Drupal\package_manager\ValidationResult; use Drupal\package_manager\ValidationResult;
/** /**
* @coversDefaultClass \Drupal\package_manager\EventSubscriber\LockFileValidator * @coversDefaultClass \Drupal\package_manager\Validator\LockFileValidator
* *
* @group package_manager * @group package_manager
*/ */
......
...@@ -5,7 +5,7 @@ namespace Drupal\Tests\package_manager\Kernel; ...@@ -5,7 +5,7 @@ namespace Drupal\Tests\package_manager\Kernel;
use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\KernelTests\KernelTestBase; use Drupal\KernelTests\KernelTestBase;
use Drupal\package_manager\Event\StageEvent; 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\StageException;
use Drupal\package_manager\Exception\StageValidationException; use Drupal\package_manager\Exception\StageValidationException;
use Drupal\package_manager\PathLocator; use Drupal\package_manager\PathLocator;
......
...@@ -6,7 +6,7 @@ use Drupal\package_manager\Event\PreCreateEvent; ...@@ -6,7 +6,7 @@ use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\ValidationResult; use Drupal\package_manager\ValidationResult;
/** /**
* @covers \Drupal\package_manager\EventSubscriber\PendingUpdatesValidator * @covers \Drupal\package_manager\Validator\PendingUpdatesValidator
* *
* @group package_manager * @group package_manager
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Drupal\Tests\package_manager\Kernel; namespace Drupal\Tests\package_manager\Kernel;
use Drupal\package_manager\Event\PreCreateEvent; 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\package_manager\ValidationResult;
use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ContainerBuilder;
...@@ -15,7 +15,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder; ...@@ -15,7 +15,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder;
* *
* @see \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::assertReadOnlyFileSystemError() * @see \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::assertReadOnlyFileSystemError()
* *
* @covers \Drupal\package_manager\EventSubscriber\WritableFileSystemValidator * @covers \Drupal\package_manager\Validator\WritableFileSystemValidator
* *
* @group package_manager * @group package_manager
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Drupal\automatic_updates\Validator; namespace Drupal\automatic_updates\Validator;
use Drupal\automatic_updates\Event\ReadinessCheckEvent; use Drupal\automatic_updates\Event\ReadinessCheckEvent;
use Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface; use Drupal\package_manager\Validator\PreOperationStageValidatorInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/** /**
...@@ -18,14 +18,14 @@ class PackageManagerReadinessCheck implements EventSubscriberInterface { ...@@ -18,14 +18,14 @@ class PackageManagerReadinessCheck implements EventSubscriberInterface {
/** /**
* The validator to run. * The validator to run.
* *
* @var \Drupal\package_manager\EventSubscriber\PreOperationStageValidatorInterface * @var \Drupal\package_manager\Validator\PreOperationStageValidatorInterface
*/ */
protected $validator; protected $validator;
/** /**
* Constructs a PackageManagerReadinessCheck object. * 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. * The Package Manager validator to run during readiness checking.
*/ */
public function __construct(PreOperationStageValidatorInterface $validator) { public function __construct(PreOperationStageValidatorInterface $validator) {
......
...@@ -4,7 +4,7 @@ namespace Drupal\Tests\automatic_updates\Kernel\ReadinessValidation; ...@@ -4,7 +4,7 @@ namespace Drupal\Tests\automatic_updates\Kernel\ReadinessValidation;
use Drupal\automatic_updates\Event\ReadinessCheckEvent; use Drupal\automatic_updates\Event\ReadinessCheckEvent;
use Drupal\Core\DependencyInjection\ContainerBuilder; 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 Drupal\Tests\automatic_updates\Kernel\AutomaticUpdatesKernelTestBase;
use Prophecy\Argument; use Prophecy\Argument;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment