diff --git a/docs/processors.md b/docs/processors.md index 7240bb796..840ad63fb 100644 --- a/docs/processors.md +++ b/docs/processors.md @@ -15,12 +15,12 @@ When your resource is a Doctrine entity, there are default processors which are As it uses the Doctrine repository configured on your resource, it will automatically flush data for you. -| Operation | Processor | -|-------------|------------------------------------------------------------------| -| create | Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor | -| update | Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor | -| delete | Sylius\Component\Resource\Doctrine\Common\State\RemoveProcessor | -| bulk delete | Sylius\Component\Resource\Doctrine\Common\State\RemoveProcessor | +| Operation | Processor | +|-------------|--------------------------------------------------------| +| create | Sylius\Resource\Doctrine\Common\State\PersistProcessor | +| update | Sylius\Resource\Doctrine\Common\State\PersistProcessor | +| delete | Sylius\Resource\Doctrine\Common\State\RemoveProcessor | +| bulk delete | Sylius\Resource\Doctrine\Common\State\RemoveProcessor | ## Custom processors @@ -36,7 +36,7 @@ As an example, send an email after customer registration namespace App\Sylius\State\Processor; use Sylius\Component\Customer\Model\CustomerInterface; -use Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor; +use Sylius\Resource\Doctrine\Common\State\PersistProcessor; use Sylius\Component\Resource\State\ProcessorInterface; final class CreateCustomerProcessor implements ProcessorInterface diff --git a/src/Component/spec/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactorySpec.php b/src/Component/spec/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactorySpec.php index d2f8c3d30..6ef377640 100644 --- a/src/Component/spec/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactorySpec.php +++ b/src/Component/spec/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactorySpec.php @@ -14,9 +14,6 @@ namespace spec\Sylius\Component\Resource\Doctrine\Common\Metadata\Resource\Factory; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Doctrine\Common\Metadata\Resource\Factory\DoctrineResourceMetadataCollectionFactory; -use Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor; -use Sylius\Component\Resource\Doctrine\Common\State\RemoveProcessor; use Sylius\Component\Resource\Metadata\Create; use Sylius\Component\Resource\Metadata\Delete; use Sylius\Component\Resource\Metadata\MetadataInterface; @@ -25,6 +22,9 @@ use Sylius\Component\Resource\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface; use Sylius\Component\Resource\Metadata\Resource\ResourceMetadataCollection; use Sylius\Component\Resource\Metadata\ResourceMetadata; +use Sylius\Resource\Doctrine\Common\Metadata\Resource\Factory\DoctrineResourceMetadataCollectionFactory; +use Sylius\Resource\Doctrine\Common\State\PersistProcessor; +use Sylius\Resource\Doctrine\Common\State\RemoveProcessor; final class DoctrineResourceMetadataCollectionFactorySpec extends ObjectBehavior { diff --git a/src/Component/spec/Doctrine/Common/State/PersistProcessorSpec.php b/src/Component/spec/Doctrine/Common/State/PersistProcessorSpec.php index f4b101ccf..a5639fc55 100644 --- a/src/Component/spec/Doctrine/Common/State/PersistProcessorSpec.php +++ b/src/Component/spec/Doctrine/Common/State/PersistProcessorSpec.php @@ -17,9 +17,9 @@ use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ObjectManager; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor; use Sylius\Component\Resource\Metadata\Operation; use Sylius\Resource\Context\Context; +use Sylius\Resource\Doctrine\Common\State\PersistProcessor; final class PersistProcessorSpec extends ObjectBehavior { diff --git a/src/Component/spec/Doctrine/Common/State/RemoveProcessorSpec.php b/src/Component/spec/Doctrine/Common/State/RemoveProcessorSpec.php index 2f79ef00e..e1835959f 100644 --- a/src/Component/spec/Doctrine/Common/State/RemoveProcessorSpec.php +++ b/src/Component/spec/Doctrine/Common/State/RemoveProcessorSpec.php @@ -16,9 +16,9 @@ use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ObjectManager; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Doctrine\Common\State\RemoveProcessor; use Sylius\Component\Resource\Metadata\Operation; use Sylius\Resource\Context\Context; +use Sylius\Resource\Doctrine\Common\State\RemoveProcessor; final class RemoveProcessorSpec extends ObjectBehavior { diff --git a/src/Component/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php b/src/Component/src/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php similarity index 92% rename from src/Component/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php rename to src/Component/src/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php index 3192684e0..4078708df 100644 --- a/src/Component/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php +++ b/src/Component/src/Doctrine/Common/Metadata/Resource/Factory/DoctrineResourceMetadataCollectionFactory.php @@ -11,10 +11,8 @@ declare(strict_types=1); -namespace Sylius\Component\Resource\Doctrine\Common\Metadata\Resource\Factory; +namespace Sylius\Resource\Doctrine\Common\Metadata\Resource\Factory; -use Sylius\Component\Resource\Doctrine\Common\State\PersistProcessor; -use Sylius\Component\Resource\Doctrine\Common\State\RemoveProcessor; use Sylius\Component\Resource\Metadata\DeleteOperationInterface; use Sylius\Component\Resource\Metadata\Operation; use Sylius\Component\Resource\Metadata\Operations; @@ -22,6 +20,8 @@ use Sylius\Component\Resource\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface; use Sylius\Component\Resource\Metadata\Resource\ResourceMetadataCollection; use Sylius\Component\Resource\Metadata\ResourceMetadata; +use Sylius\Resource\Doctrine\Common\State\PersistProcessor; +use Sylius\Resource\Doctrine\Common\State\RemoveProcessor; final class DoctrineResourceMetadataCollectionFactory implements ResourceMetadataCollectionFactoryInterface { diff --git a/src/Component/Doctrine/Common/State/PersistProcessor.php b/src/Component/src/Doctrine/Common/State/PersistProcessor.php similarity index 97% rename from src/Component/Doctrine/Common/State/PersistProcessor.php rename to src/Component/src/Doctrine/Common/State/PersistProcessor.php index f05d6c6fc..d0fa1f722 100644 --- a/src/Component/Doctrine/Common/State/PersistProcessor.php +++ b/src/Component/src/Doctrine/Common/State/PersistProcessor.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Component\Resource\Doctrine\Common\State; +namespace Sylius\Resource\Doctrine\Common\State; use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataInfo; diff --git a/src/Component/Doctrine/Common/State/RemoveProcessor.php b/src/Component/src/Doctrine/Common/State/RemoveProcessor.php similarity index 95% rename from src/Component/Doctrine/Common/State/RemoveProcessor.php rename to src/Component/src/Doctrine/Common/State/RemoveProcessor.php index ed6ada7ee..15dfe15c6 100644 --- a/src/Component/Doctrine/Common/State/RemoveProcessor.php +++ b/src/Component/src/Doctrine/Common/State/RemoveProcessor.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Component\Resource\Doctrine\Common\State; +namespace Sylius\Resource\Doctrine\Common\State; use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ObjectManager as DoctrineObjectManager;