Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6981fff

Browse filesBrowse files
author
Amrouche Hamza
committed
[WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
1 parent 9793522 commit 6981fff
Copy full SHA for 6981fff

File tree

1 file changed

+8
-1
lines changed
Filter options

1 file changed

+8
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ protected function processValue($value, $isRoot = false)
115115
if ($method instanceof \ReflectionFunctionAbstract) {
116116
$reflectionMethod = $method;
117117
} else {
118-
$reflectionMethod = $this->getReflectionMethod($value, $method);
118+
try {
119+
$reflectionMethod = $this->getReflectionMethod($value, $method);
120+
} catch (RuntimeException $e) {
121+
if ($value->getFactory()) {
122+
continue;
123+
}
124+
throw $e;
125+
}
119126
}
120127

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.