use ChildDefinition instead of DefinitionDecorator (#485)

This commit is contained in:
Gregor Harlan 2018-02-12 16:17:43 +01:00 committed by Marc J. Schmidt
parent ea6a359272
commit d671fbeb4a

View file

@ -11,7 +11,7 @@ namespace Propel\Bundle\PropelBundle\DependencyInjection\Security\UserProvider;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* PropelFactory creates services for Propel user provider.
@ -30,7 +30,7 @@ class PropelFactory implements UserProviderFactoryInterface
public function create(ContainerBuilder $container, $id, $config)
{
$container
->setDefinition($id, new DefinitionDecorator($this->providerId))
->setDefinition($id, new ChildDefinition($this->providerId))
->addArgument($config['class'])
->addArgument($config['property'])
;