Skip to content

Commit

Permalink
Merge pull request #15 from prooph/fix_container_plugin
Browse files Browse the repository at this point in the history
MessageBusFactory cannot access private service
  • Loading branch information
lunetics authored Apr 1, 2017
2 parents 0f7d17a + d937e52 commit b6436b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/DependencyInjection/ProophServiceBusExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private function loadBus(string $type, string $name, array $options, ContainerBu
$messageFactoryPluginId = 'prooph_service_bus.message_factory_plugin.'.$name;
$messageFactoryPluginDefinition = new DefinitionDecorator('prooph_service_bus.message_factory_plugin');
$messageFactoryPluginDefinition->setArguments([new Reference($messageFactoryId)]);
$messageFactoryPluginDefinition->setPublic(true);

$container->setDefinition(
$messageFactoryPluginId,
Expand All @@ -159,6 +160,7 @@ private function loadBus(string $type, string $name, array $options, ContainerBu
$routerId = 'prooph_service_bus.' . $name . '.router';
$routerDefinition = new DefinitionDecorator($options['router']['type']);
$routerDefinition->setArguments([$options['router']['routes'] ?? []]);
$routerDefinition->setPublic(true);
$container->setDefinition($routerId, $routerDefinition);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/service_bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<service id="prooph_service_bus.on_event_invoke_strategy" class="Prooph\ServiceBus\Plugin\InvokeStrategy\OnEventStrategy" />
<service id="prooph_service_bus.message_factory_plugin" class="%prooph_service_bus.message_factory_plugin.class%" public="false" abstract="true" />
<service id="prooph_service_bus.message_factory" class="%prooph_service_bus.message_factory.class%" />
<service id="prooph_service_bus.container_plugin" class="%prooph_service_bus.container_plugin.class%" public="false">
<service id="prooph_service_bus.container_plugin" class="%prooph_service_bus.container_plugin.class%">
<argument type="service" id="prooph_service_bus.container_wrapper" />
</service>
<service id="prooph_service_bus.container_wrapper" class="%prooph_service_bus.container_wrapper.class%" public="false">
Expand Down

0 comments on commit b6436b2

Please sign in to comment.