Update dependency injection for Symfony 4.*
This commit is contained in:
parent
8a40d23a94
commit
813dd52d70
|
@ -152,7 +152,7 @@ class BeSimpleSoapExtension extends Extension
|
||||||
$definition = new ChildDefinition('besimple.soap.client');
|
$definition = new ChildDefinition('besimple.soap.client');
|
||||||
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
|
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
|
||||||
|
|
||||||
if (3 === Kernel::MAJOR_VERSION) {
|
if (Kernel::MAJOR_VERSION >= 3) {
|
||||||
$definition->setFactory(array(
|
$definition->setFactory(array(
|
||||||
new Reference(sprintf('besimple.soap.client.builder.%s', $client)),
|
new Reference(sprintf('besimple.soap.client.builder.%s', $client)),
|
||||||
'build'
|
'build'
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
<argument type="service" id="besimple.soap.cache" /> <!-- hack to load besimple cache configuration -->
|
<argument type="service" id="besimple.soap.cache" /> <!-- hack to load besimple cache configuration -->
|
||||||
</service>
|
</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" />
|
<service id="besimple.soap.classmap" class="%besimple.soap.classmap.class%" abstract="true" />
|
||||||
</services>
|
</services>
|
||||||
|
|
Loading…
Reference in New Issue