From 7e2c8c39cb3a368cb39bcde3bc4f83f5b836b425 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Wed, 9 Feb 2022 16:09:41 +0100 Subject: [PATCH] Move ScopeValidatorInterface to PromotionBundle --- docs/cookbook/promotions/custom-catalog-promotion-scope.rst | 2 +- .../CatalogPromotionScope/ForProductsScopeValidator.php | 2 +- .../CatalogPromotionScope/ForTaxonsScopeValidator.php | 1 + .../CatalogPromotionScope/ForVariantsScopeValidator.php | 1 + .../Validator/Constraints/CatalogPromotionScopeValidator.php | 2 +- .../CatalogPromotionScope/ForProductsScopeValidatorSpec.php | 2 +- .../CatalogPromotionScope/ForTaxonsScopeValidatorSpec.php | 2 +- .../CatalogPromotionScope/ForVariantsScopeValidatorSpec.php | 3 +-- .../Constraints/CatalogPromotionScopeValidatorSpec.php | 2 +- .../CatalogPromotionScope/ScopeValidatorInterface.php | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) rename src/Sylius/Bundle/{CoreBundle => PromotionBundle}/Validator/CatalogPromotionScope/ScopeValidatorInterface.php (87%) diff --git a/docs/cookbook/promotions/custom-catalog-promotion-scope.rst b/docs/cookbook/promotions/custom-catalog-promotion-scope.rst index 0ab38a40b278..eb53eb3e9955 100644 --- a/docs/cookbook/promotions/custom-catalog-promotion-scope.rst +++ b/docs/cookbook/promotions/custom-catalog-promotion-scope.rst @@ -87,7 +87,7 @@ keys to check as well as their corresponding values. namespace App\Validator\CatalogPromotionScope; - use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; + use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForProductsScopeValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForProductsScopeValidator.php index 1b35bce056e1..f647afda5225 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForProductsScopeValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForProductsScopeValidator.php @@ -14,8 +14,8 @@ namespace Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; -use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForTaxonsScopeValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForTaxonsScopeValidator.php index ebd26a924cd6..43d84a6f5f79 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForTaxonsScopeValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForTaxonsScopeValidator.php @@ -14,6 +14,7 @@ namespace Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForVariantsScopeValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForVariantsScopeValidator.php index e21deaff1271..21438d538ae0 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForVariantsScopeValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ForVariantsScopeValidator.php @@ -14,6 +14,7 @@ namespace Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CatalogPromotionScopeValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CatalogPromotionScopeValidator.php index c437ae31b9f8..c18408c1afb2 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CatalogPromotionScopeValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CatalogPromotionScopeValidator.php @@ -13,7 +13,7 @@ namespace Sylius\Bundle\CoreBundle\Validator\Constraints; -use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForProductsScopeValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForProductsScopeValidatorSpec.php index f5d57a670725..dee199a8ce46 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForProductsScopeValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForProductsScopeValidatorSpec.php @@ -14,8 +14,8 @@ namespace spec\Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForTaxonsScopeValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForTaxonsScopeValidatorSpec.php index f038c65792e8..3b1c134581ab 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForTaxonsScopeValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForTaxonsScopeValidatorSpec.php @@ -14,8 +14,8 @@ namespace spec\Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForVariantsScopeValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForVariantsScopeValidatorSpec.php index f6d7f6ffd6b3..4ee4f2a9f36f 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForVariantsScopeValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/CatalogPromotionScope/ForVariantsScopeValidatorSpec.php @@ -14,11 +14,10 @@ namespace spec\Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface; -use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CatalogPromotionScopeValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CatalogPromotionScopeValidatorSpec.php index 466f66f5e63b..393dfa1dfbac 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CatalogPromotionScopeValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CatalogPromotionScopeValidatorSpec.php @@ -16,8 +16,8 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\CoreBundle\Checker\InForTaxonsScopeVariantChecker; use Sylius\Bundle\CoreBundle\Checker\InForVariantsScopeVariantChecker; -use Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Bundle\CoreBundle\Validator\Constraints\CatalogPromotionScope; +use Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope\ScopeValidatorInterface; use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php b/src/Sylius/Bundle/PromotionBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php similarity index 87% rename from src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php rename to src/Sylius/Bundle/PromotionBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php index 015529707a57..6240e7dc6857 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php +++ b/src/Sylius/Bundle/PromotionBundle/Validator/CatalogPromotionScope/ScopeValidatorInterface.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Bundle\CoreBundle\Validator\CatalogPromotionScope; +namespace Sylius\Bundle\PromotionBundle\Validator\CatalogPromotionScope; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface;