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 +256,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
231
256
232
257
// no default value? Then fail
233
258
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));
259
+
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
260
}
236
261
237
262
// specifically pass the default value
@@ -246,7 +271,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