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
// The exception code is set to 1 if the exception must be thrown even if it's an optional setter
304
10000
-
if (1 === $e->getCode() || self::MODE_REQUIRED === $mode) {
305
-
throw$e;
306
-
}
307
-
308
-
returnarray();
309
-
}
310
-
}
311
-
} else {
312
-
// Typehint against a non-existing class
313
-
314
-
if (!$parameter->isDefaultValueAvailable()) {
315
-
if (self::MODE_REQUIRED === $mode) {
316
-
thrownewRuntimeException(sprintf('Cannot autowire argument $%s of method %s::%s() for service "%s": Class %s does not exist.', $parameter->name, $reflectionMethod->class, $reflectionMethod->name, $this->currentId, $typeName));
thrownewRuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". No matching services were found and it cannot be auto-registered.', $typeName, $this->currentId));
281
+
} else {
282
+
returnarray();
323
283
}
324
284
325
285
$arguments[$index] = $value;
@@ -352,42 +312,39 @@ private function autowireOverridenGetters(array $overridenGetters, array $autowi
thrownewRuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". Multiple services exist for this %s (%s).', $typeHint->name, $this->currentId, $classOrInterface, $matchingServices), 1);
443
+
thrownewRuntimeException(sprintf('Unable to autowire argument of type "%s" for the ser
F438
vice "%s". Multiple services exist for this %s (%s).', $typeHint->name, $this->currentId, $classOrInterface, $matchingServices));
thrownewRuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $this->currentId, $classOrInterface));
447
+
return;
492
448
}
493
449
494
450
$currentId = $this->currentId;
@@ -500,14 +456,8 @@ private function createAutowiredDefinition(\ReflectionClass $typeHint)
$message = sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $this->currentId, $classOrInterface);
0 commit comments