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
thrownewAutowiringFailedException($service, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s::_construct()", you should configure its value explicitly.', $service, $parameter->getName(), static::class));
56
+
}
57
+
$args[] = $drushContainer->get($service);
58
+
continue;
37
59
}
38
60
39
-
if (!$container->has($service)) {
40
-
thrownewAutowiringFailedException($service, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s::_construct()", you should configure its value explicitly.', $service, $parameter->getName(), static::class));
// Resolve argument name when arguments are passed as list.
66
+
if (is_int($key)) {
67
+
if ($argument === null || !isset(self::ACCEPTED_AUTOWIRE_ARGUMENTS[$key])) {
68
+
continue;
69
+
}
70
+
$key = self::ACCEPTED_AUTOWIRE_ARGUMENTS[$key];
71
+
}
72
+
73
+
if (!in_array($key, self::ACCEPTED_AUTOWIRE_ARGUMENTS, true)) {
74
+
continue;
75
+
}
42
76
43
-
$args[] = $container->get($service);
77
+
$value = $attribute->newInstance()->value;
78
+
$valueAsString = (string) $value;
79
+
$value = match ($key) {
80
+
'service' => $drushContainer->has($valueAsString) ? $drushContainer->get($valueAsString) : thrownewAutowiringFailedException($valueAsString, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s::_construct()", you should configure its value explicitly.', $valueAsString, $parameter->getName(), static::class)),
0 commit comments