0

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

JorgeeFG
  • 5,651
  • 12
  • 59
  • 92
  • What does the exception say? – lxg Feb 28 '18 at 20:03
  • @lxg I added it – JorgeeFG Feb 28 '18 at 20:05
  • Is there any reason why you don’t inherit from `Symfony\Component\HttpKernel\DependencyInjection\Extension` and use its `$this->processConfiguration`? I don’t know if this is related to the problem, but this is the default when SF creates a bundle. – lxg Feb 28 '18 at 20:08
  • @lxg I'm using the service container component, not the full framework. The docs says that I only need to implement that interface. Where can I see the info you posted? – JorgeeFG Feb 28 '18 at 20:10
  • Oh, I see. Here’s an example of an extension class when SF generates the bundle skeleton for you: https://pastebin.com/NZhwAygb – lxg Feb 28 '18 at 20:17

0 Answers0