Skip to content

Commit

Permalink
bug #701 [HotFix] Flip id with alias on resource loader (loic425)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.10 branch.

Discussion
----------

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

That does not work for decoration anymore.

Here is an example which fails without this fix.
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <defaults public="true" />

        <service id="Mobizel\SyliusExportPlugin\Routing\ResourceLoader"
                 decorates="sylius.routing.loader.resource"
                 public="false"
        >
            <argument type="service" id="Mobizel\SyliusExportPlugin\Routing\ResourceLoader.inner"/>
            <argument type="service" id="sylius.resource_registry" />
            <argument type="service">
                <service class="Sylius\Bundle\ResourceBundle\Routing\RouteFactory" />
            </argument>
        </service>
    </services>
</container>
```

Commits
-------

3b81f2d [HotFix] Flip id an alias on resource loader
  • Loading branch information
lchrusciel authored Apr 17, 2023
2 parents b10749a + 3b81f2d commit da093f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bundle/Resources/config/services/routing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<services>
<defaults public="true" />

<service id="Sylius\Bundle\ResourceBundle\Routing\ResourceLoader" public="false">
<service id="sylius.routing.loader.resource" class="Sylius\Bundle\ResourceBundle\Routing\ResourceLoader" public="false">
<argument type="service" id="sylius.resource_registry" />
<argument type="service">
<service class="Sylius\Bundle\ResourceBundle\Routing\RouteFactory" />
</argument>
<tag name="routing.loader" />
</service>
<service id="sylius.routing.loader.resource" alias="Sylius\Bundle\ResourceBundle\Routing\ResourceLoader" public="false" />
<service id="Sylius\Bundle\ResourceBundle\Routing\ResourceLoader" alias="sylius.routing.loader.resource" public="false" />

<service id="sylius.routing.loader.crud_routes_attributes" class="Sylius\Bundle\ResourceBundle\Routing\CrudRoutesAttributesLoader" public="false">
<argument>%sylius.resource.mapping%</argument>
Expand Down

0 comments on commit da093f5

Please sign in to comment.