Skip to content

Commit

Permalink
Remove "other_middlewares" configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
scaytrase authored and ruudk committed Jan 11, 2019
1 parent 5bfc819 commit 939594a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/DependencyInjection/CommandBusConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function getConfigTreeBuilder()
->children()
->booleanNode('logger')->defaultFalse()->end()
->booleanNode('finishes_command_before_handling_next')->defaultTrue()->end()
->booleanNode('other_middlewares')->defaultTrue()->end()
->end()
->end()
->arrayNode('logging')
Expand Down
2 changes: 0 additions & 2 deletions src/DependencyInjection/CommandBusExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,5 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
$container->getDefinition('simple_bus.command_bus.finishes_command_before_handling_next_middleware')
->addTag('command_bus_middleware', ['priority' => 1000]);
}

$container->setParameter('simple_bus.command_bus.append_tagged_middlewares', $mergedConfig['middlewares']['other_middlewares']);
}
}
5 changes: 0 additions & 5 deletions src/DependencyInjection/Compiler/ConfigureMiddlewares.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ public function process(ContainerBuilder $container)
return;
}

if (!$container->hasParameter('simple_bus.command_bus.append_tagged_middlewares')
|| !$container->getParameter('simple_bus.command_bus.append_tagged_middlewares')) {
return;
}

$middlewareIds = new \SplPriorityQueue();

foreach ($container->findTaggedServiceIds($this->busTag) as $specializedBusId => $tags) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ protected function setUp()
$this->mainBusDefinition->setPublic(true);
$this->container->setDefinition($this->mainBusId, $this->mainBusDefinition);
$this->container->addCompilerPass(new ConfigureMiddlewares($this->mainBusId, $this->middlewareTag));
$this->container->setParameter('simple_bus.command_bus.append_tagged_middlewares', true);
}

/**
Expand Down

0 comments on commit 939594a

Please sign in to comment.