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
Copy file name to clipboardExpand all lines: UPGRADE-3.3.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ Debug
80
80
DependencyInjection
81
81
-------------------
82
82
83
+
*[BC BREAK] autowiring now happens only when a type-hint matches its corresponding FQCN id or alias, and does not auto-register discovered type-hints as services anymore. Please follow the suggestions provided by the exceptions thrown at compilation to upgrade your service configuration.
84
+
83
85
*[BC BREAK]`_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names.
84
86
85
87
*[BC BREAK] non-numeric keys in methods and constructors arguments have never been supported and are now forbidden. Please remove them if you happen to have one.
Copy file name to clipboardExpand all lines: UPGRADE-4.0.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,8 @@ Debug
73
73
DependencyInjection
74
74
-------------------
75
75
76
+
* Autowiring now happens only when a type-hint matches its corresponding FQCN id or alias, and does not auto-register discovered type-hints as services anymore.
77
+
76
78
*`_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names.
77
79
78
80
* Non-numeric keys in methods and constructors arguments have never been supported and are now forbidden. Please remove them if you happen to have one.
@@ -242,7 +223,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
242
223
243
224
// no default value? Then fail
244
225
if (!$parameter->isDefaultValueAvailable()) {
245
-
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));
226
+
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));
246
227
}
247
228
248
229
// specifically pass the default value
@@ -251,17 +232,27 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
251
232
continue;
252
233
}
253
234
254
-
if (!$value = $this->getAutowiredReference($type)) {
$this->container->log($this, sprintf('Service "%s" matches type "%s" and has been autowired into service "%s".', $this->types[$type], $type, $this->currentId));
0 commit comments