symfony 3 Конфигурацией, настройка бандлов -- добавить параметры к загруженному из XML. Service, Reference class, Definition

Или можно было произвести переопределение конфигурации XML так:

    /**
     * {@inheritDoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $this->processConfiguration($configuration, $configs);

        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.xml');
        
        $definition = $container->getDefinition('coop_tilleuls_acl_sonata_admin_extension.acl.extension');
        
        if (interface_exists(TokenStorageInterface::class)) {
            $definition->replaceArgument(0 ,new Reference('security.token_storage'));  
        } else {
            $definition->replaceArgument(0, new Reference('security.context'));
        }
        
    }

Что ещё почитать:

  1. Манипуляция параметрами сервисов и определениями -- Symfony2: Manipulating Service Parameters and Definitions: http://richardmiller.co.uk/2012/02/22/sy...