Skip to content

Commit

Permalink
bug #941 Fix Doctrine dependency on state processors (loic425)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

We also have to move doctrine-bundle on dev requirement, but maybe it will be safer to do this on 1.12 branch.

Commits
-------

833f37c Fix Doctrine dependency on state processors
  • Loading branch information
GSadee authored Sep 23, 2024
2 parents 543e707 + 833f37c commit 7e2f214
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
15 changes: 12 additions & 3 deletions src/Bundle/Resources/config/services/integrations/doctrine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@

<container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://symfony.com/schema/dic/services" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults public="true" />

<service id="Sylius\Bundle\ResourceBundle\Doctrine\ResourceMappingDriverChain"
decorates="doctrine.orm.default_metadata_driver">
decorates="doctrine.orm.default_metadata_driver"
public="true">
<argument type="service" id="Sylius\Bundle\ResourceBundle\Doctrine\ResourceMappingDriverChain.inner" />
<argument type="service" id="sylius.resource_registry" />
</service>
<service id="sylius_resource.doctrine.mapping_driver_chain" alias="Sylius\Bundle\ResourceBundle\Doctrine\ResourceMappingDriverChain" />

<service id="Sylius\Resource\Doctrine\Common\State\PersistProcessor">
<argument type="service" id="doctrine" />
<tag name="sylius.state_processor" />
</service>

<service id="Sylius\Resource\Doctrine\Common\State\RemoveProcessor">
<argument type="service" id="doctrine" />
<tag name="sylius.state_processor" />
</service>
</services>
</container>
12 changes: 1 addition & 11 deletions src/Bundle/Resources/config/services/state.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,9 @@
<tag name="sylius.state_provider" />
</service>

<service id="Sylius\Resource\Doctrine\Common\State\PersistProcessor">
<argument type="service" id="doctrine" />
<tag name="sylius.state_processor" />
</service>

<service id="Sylius\Resource\Doctrine\Common\State\RemoveProcessor">
<argument type="service" id="doctrine" />
<tag name="sylius.state_processor" />
</service>

<service id="Sylius\Resource\StateMachine\State\ApplyStateMachineTransitionProcessor">
<argument type="service" id="sylius.state_machine.operation" />
<argument type="service" id="Sylius\Resource\Doctrine\Common\State\PersistProcessor" />
<argument type="service" id="Sylius\Resource\Doctrine\Common\State\PersistProcessor" on-invalid="null" />
<tag name="sylius.state_processor" />
</service>

Expand Down

0 comments on commit 7e2f214

Please sign in to comment.