Replace DefinitionDecorator with ChildDefinition
This commit is contained in:
parent
0e24ffe23d
commit
873dc0ae08
|
@ -17,7 +17,7 @@ use BeSimple\SoapCommon\Cache;
|
||||||
use Symfony\Component\Config\Definition\Processor;
|
use Symfony\Component\Config\Definition\Processor;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
use Symfony\Component\DependencyInjection\ChildDefinition;
|
||||||
use Symfony\Component\DependencyInjection\Reference;
|
use Symfony\Component\DependencyInjection\Reference;
|
||||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
|
@ -88,7 +88,7 @@ class BeSimpleSoapExtension extends Extension
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($config as $client => $options) {
|
foreach ($config as $client => $options) {
|
||||||
$definition = new DefinitionDecorator('besimple.soap.client.builder');
|
$definition = new ChildDefinition('besimple.soap.client.builder');
|
||||||
$container->setDefinition(sprintf('besimple.soap.client.builder.%s', $client), $definition);
|
$container->setDefinition(sprintf('besimple.soap.client.builder.%s', $client), $definition);
|
||||||
|
|
||||||
$definition->replaceArgument(0, $options['wsdl']);
|
$definition->replaceArgument(0, $options['wsdl']);
|
||||||
|
@ -135,7 +135,7 @@ class BeSimpleSoapExtension extends Extension
|
||||||
|
|
||||||
private function createClientClassmap($client, array $classmap, ContainerBuilder $container)
|
private function createClientClassmap($client, array $classmap, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
$definition = new DefinitionDecorator('besimple.soap.classmap');
|
$definition = new ChildDefinition('besimple.soap.classmap');
|
||||||
$container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
$container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
||||||
|
|
||||||
if (!empty($classmap)) {
|
if (!empty($classmap)) {
|
||||||
|
@ -149,7 +149,7 @@ class BeSimpleSoapExtension extends Extension
|
||||||
|
|
||||||
private function createClient($client, ContainerBuilder $container)
|
private function createClient($client, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
$definition = new DefinitionDecorator('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 (3 === Kernel::MAJOR_VERSION) {
|
||||||
|
@ -168,7 +168,7 @@ class BeSimpleSoapExtension extends Extension
|
||||||
unset($config['binding']);
|
unset($config['binding']);
|
||||||
|
|
||||||
$contextId = 'besimple.soap.context.'.$config['name'];
|
$contextId = 'besimple.soap.context.'.$config['name'];
|
||||||
$definition = new DefinitionDecorator('besimple.soap.context.'.$bindingSuffix);
|
$definition = new ChildDefinition('besimple.soap.context.'.$bindingSuffix);
|
||||||
$container->setDefinition($contextId, $definition);
|
$container->setDefinition($contextId, $definition);
|
||||||
|
|
||||||
if (isset($config['cache_type'])) {
|
if (isset($config['cache_type'])) {
|
||||||
|
|
Loading…
Reference in New Issue