JorgeeFG
JorgeeFG

Reputation: 5981

Symfony's Dependency Injection module, ServiceDefinitions are not loaded at the moment of using an Extension

As per the examples, I'm doing the right thing.

However, definitions are empty.

These are my settings:

services:
    form_manager:
        public: true
        alias: BI\GRV\Application\Services\FormManager\FormManager
    integration_layer_client:
        class: BI\GRV\Application\Services\IntegrationLayerClient\IntegrationLayerClient
        public: true

This is a part of the Extension file

class IntegrationLayerClientExtension implements ExtensionInterface {

    public function load(array $configs, ContainerBuilder $container) {
        $configuration = new IntegrationLayerClientConfiguration();
        $processor = new Processor();
        $config = $processor->processConfiguration($configuration, $configs);
    dump($container->getDefinitions());
        $def = $container->findDefinition('integration_layer_client'); // Exception here
        #$def->replaceArgument(0, $config['twitter']['client_id']);
    #$def->replaceArgument(1, $config['twitter']['client_secret']);
    }

PHP Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'You have requested a non-existent service "integration_layer_client".' in XXX\Proyectos\GRV\Repos\grv-core\vendor\symfony\dependency-injection\ContainerBuilder.php:1022

Upvotes: 0

Views: 56

Answers (0)

Related Questions