Update dependency injection for Symfony 4.*

This commit is contained in:
wpetit 2022-02-09 09:47:50 +01:00
parent 8a40d23a94
commit 813dd52d70
2 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,7 @@ class BeSimpleSoapExtension extends Extension
$definition = new ChildDefinition('besimple.soap.client');
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
if (3 === Kernel::MAJOR_VERSION) {
if (Kernel::MAJOR_VERSION >= 3) {
$definition->setFactory(array(
new Reference(sprintf('besimple.soap.client.builder.%s', $client)),
'build'

View File

@ -19,7 +19,9 @@
<argument type="service" id="besimple.soap.cache" /> <!-- hack to load besimple cache configuration -->
</service>
<service id="besimple.soap.client" factory-service="besimple.soap.client.builder" factory-method="build" class="%besimple.soap.client.builder.class%" abstract="true" />
<service id="besimple.soap.client" class="%besimple.soap.client.builder.class%" abstract="true">
<factory service="besimple.soap.client.builder" method="build" />
</service>
<service id="besimple.soap.classmap" class="%besimple.soap.classmap.class%" abstract="true" />
</services>