Skip to content

Commit

Permalink
Remove Component namespace on Doctrine
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Oct 25, 2023
1 parent f0ff413 commit c75ca4c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions docs/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

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;
use Sylius\Component\Resource\Metadata\RegistryInterface;
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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c75ca4c

Please sign in to comment.