Skip to content

Commit

Permalink
Merge pull request #15 from elcuro/remove-inflector-check
Browse files Browse the repository at this point in the history
Removed method inflector service check
  • Loading branch information
rosstuck committed Apr 21, 2016
2 parents db454e4 + 9cd6fda commit 14b38eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions DependencyInjection/TacticianExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,13 @@ function ($middlewareServiceId) {
*
* @param array $mergedConfig
* @param ContainerBuilder $container
* @throws \Exception
*/
private function injectMethodNameInflector(array $mergedConfig, ContainerBuilder $container)
{
if (! $container->has('tactician.middleware.command_handler')) {
return;
}

if (! $container->has($mergedConfig['method_inflector'])) {
throw new \Exception(
'Unable to find requested method_inflector service definition: ' . $mergedConfig['method_inflector']
);
}

$inflectorReference = new Reference($mergedConfig['method_inflector']);

$handlerLocator = $container->findDefinition('tactician.middleware.command_handler');
Expand Down
10 changes: 0 additions & 10 deletions Tests/DependencyInjection/TacticianExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,4 @@ public function testMethodNameInflectorNonDefault()
new Reference('tactician.handler.method_name_inflector.handle_class_name_without_suffix')
);
}

/**
* @expectedException \Exception
*/
public function testMethodNameInflectorThrowsErrorIfNonExistingService()
{
$this->load([
'method_inflector' => 'i.do.not.exist'
]);
}
}

0 comments on commit 14b38eb

Please sign in to comment.