You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -231,7 +268,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
231
268
232
269
// no default value? Then fail
233
270
if (!$parameter->isDefaultValueAvailable()) {
234
-
thrownewRuntimeException(sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" must have a type-hint or be given a value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method));
271
+
thrownewAutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" must have a type-hint or be given a value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method));
235
272
}
236
273
237
274
// specifically pass the default value
@@ -246,7 +283,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
* @expectedExceptionMessage Cannot autowire service "a": argument "$collision" of method "Symfony\Component\DependencyInjection\Tests\Compiler\CannotBeAutowired::__construct()" references interface "Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "c1", "c2", "c3".
0 commit comments