diff --git a/composer.json b/composer.json index 596cfaa..1201e18 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ "atoum/atoum-bundle" : "dev-master", "m6web/coke" : "~1.2", "m6web/symfony2-coding-standard" : "~1.1", - "symfony/framework-bundle" : "^2.8 || ^3.0", - "symfony/yaml": "^2.8 || ^3.0" + "symfony/framework-bundle" : "^2.8 || ^3.0 || ^4.0", + "symfony/yaml": "^2.8 || ^3.0 || ^4.0" }, "conflict": { "symfony/yaml": "<2.8" diff --git a/src/AmqpBundle/DependencyInjection/M6WebAmqpExtension.php b/src/AmqpBundle/DependencyInjection/M6WebAmqpExtension.php index 467d02e..5b841aa 100644 --- a/src/AmqpBundle/DependencyInjection/M6WebAmqpExtension.php +++ b/src/AmqpBundle/DependencyInjection/M6WebAmqpExtension.php @@ -93,6 +93,7 @@ protected function loadProducers(ContainerBuilder $container, array $config) ] ); + $producerDefinition->setPublic(true); $this->setEventDispatcher($container, $config['event_dispatcher'], $producerDefinition); // Use a factory to build the producer @@ -142,6 +143,7 @@ protected function loadConsumers(ContainerBuilder $container, array $config) ] ); + $consumerDefinition->setPublic(true); $this->setEventDispatcher($container, $config['event_dispatcher'], $consumerDefinition); // Use a factory to build the consumer @@ -162,6 +164,7 @@ protected function loadConsumers(ContainerBuilder $container, array $config) $consumerDefinition->setLazy(true); } + $container->setDefinition( sprintf('m6_web_amqp.consumer.%s', $key), $consumerDefinition