Skip to content

Commit

Permalink
[WIP] [DependencyInjection] Fix a wrong error when using a factory an…
Browse files Browse the repository at this point in the history
…d a call
  • Loading branch information
Amrouche Hamza committed Apr 6, 2019
1 parent 9793522 commit 6981fff
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -115,7 +115,14 @@ protected function processValue($value, $isRoot = false)
if ($method instanceof \ReflectionFunctionAbstract) {
$reflectionMethod = $method;
} else {
$reflectionMethod = $this->getReflectionMethod($value, $method);
try {
$reflectionMethod = $this->getReflectionMethod($value, $method);
} catch (RuntimeException $e) {
if ($value->getFactory()) {
continue;
}
throw $e;
}
}

foreach ($reflectionMethod->getParameters() as $key => $parameter) {
Expand Down

0 comments on commit 6981fff

Please sign in to comment.