Skip to content

Commit

Permalink
Fix jms serializer compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jun 6, 2024
1 parent 77792cf commit 556c85b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
13 changes: 0 additions & 13 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@
<tag name="sulu.context" context="admin"/>
</service>

<!-- FIXME hack to enable doctrine object constructor -->
<!--
could be fixed in serializer by changing JMS\SerializerBundle\DependencyInjection\Compiler\DoctrinePass:49
from "->replaceArgument(0, new Reference($previousId[$service]))"
to "->replaceArgument(1, new Reference($previousId[$service]))"
-->
<service id="jms_serializer.object_constructor" alias="sulu_redirect.object_constructor" public="false"/>
<service id="sulu_redirect.object_constructor" class="JMS\Serializer\Construction\DoctrineObjectConstructor"
public="false">
<argument type="service" id="doctrine"/>
<argument type="service" id="jms_serializer.unserialize_object_constructor"/>
</service>

<service id="sulu_redirect.import_command" class="Sulu\Bundle\RedirectBundle\Command\ImportCommand">
<argument type="service" id="sulu_redirect.import"/>
<tag name="console.command"/>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function registerBundles(): iterable
/**
* {@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
parent::registerContainerConfiguration($loader);

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"symfony/http-foundation": "^4.3 || ^5.0 || ^6.0",
"handcraftedinthealps/rest-routing-bundle": "^1.0",
"friendsofsymfony/rest-bundle": "^2.8 || ^3.0",
"jms/serializer-bundle": "^3.0 || ^4.0 || ^5.0",
"symfony/http-kernel": "^4.3 || ^5.0 || ^6.0",
"doctrine/orm": "^2.5.3",
"symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0",
Expand Down

0 comments on commit 556c85b

Please sign in to comment.