Skip to content

Commit

Permalink
add placeholder arguments in the service locator services
Browse files Browse the repository at this point in the history
this argument is not needed and uses a not existing service.
at some point symfony tries to replace/merge service locators by replacing them with their hashes
and since is common service locators, it is common to have collisions.
But somehow symfony does not detect that we change the arguments if it in a compiler pass
  • Loading branch information
goetas committed Aug 8, 2021
1 parent b24aa10 commit b1c2063
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
</service>

<service id="jms_serializer.event_dispatcher.service_locator" class="Symfony\Component\DependencyInjection\ServiceLocator" public="false">
<argument type="collection"/>
<argument type="collection">
<!--
this argument is not needed and uses a not existing service.
at some point symfony tries to replace/merge service locators by replacing them with their hashes
and since is common service locators, it is common to have collisions.
But somehow symfony does not detect that we change the arguments if it in a compiler pass
-->
<argument key="jms_serializer.event_dispatcher.service_locator" id="jms_serializer.event_dispatcher.service_locator" type="service"/>
</argument>
<tag name="container.service_locator" />
</service>

Expand All @@ -32,7 +40,15 @@
</service>

<service id="jms_serializer.handler_registry.service_locator" class="Symfony\Component\DependencyInjection\ServiceLocator" public="false">
<argument type="collection"/>
<argument type="collection">
<!--
this argument is not needed and uses a not existing service.
at some point symfony tries to replace/merge service locators by replacing them with their hashes
and since is common service locators, it is common to have collisions.
But somehow symfony does not detect that we change the arguments if it in a compiler pass
-->
<argument key="jms_serializer.handler_registry.service_locator" id="jms_serializer.handler_registry.service_locator" type="service"/>
</argument>
<tag name="container.service_locator" />
</service>

Expand Down

0 comments on commit b1c2063

Please sign in to comment.