0

根据示例,我正在做正确的事情。

但是,定义是空的。

这些是我的设置:

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

这是扩展文件的一部分

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 致命错误:未捕获的异常 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' 带有消息“您已请求不存在的服务“integration_layer_client”。在 XXX\Proyectos\GRV\Repos\grv-core\vendor\symfony\dependency-injection\ContainerBuilder.php:1022

4

0 回答 0