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-5.1.md
+1
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ DependencyInjection
21
21
* The signature of method `DeprecateTrait::deprecate()` has been updated to `DeprecateTrait::deprecation(string $package, string $version, string $message)`.
22
22
* Deprecated the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service,
23
23
configure them explicitly instead.
24
+
* The `inline()` function from the PHP-DSL has been deprecated, use `service()` instead
Copy file name to clipboardExpand all lines: UPGRADE-6.0.md
+1
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ DependencyInjection
21
21
* The signature of method `DeprecateTrait::deprecate()` has been updated to `DeprecateTrait::deprecation(string $package, string $version, string $message)`.
22
22
* Removed the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service,
23
23
configure them explicitly instead.
24
+
* The `inline()` function from the PHP-DSL has been removed, use `service()` instead
if (!$definitioninstanceof InlineServiceConfigurator) {
97
+
thrownewInvalidArgumentException(sprintf('"%s()" expects a list of definitions as returned by "%s()", "%s" given.', __METHOD__, namespace\service::class, get_debug_type($definition)));
if ($autoconfigured && $this->definitioninstanceof ChildDefinition) {
29
-
thrownewInvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
thrownewInvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
36
-
} elseif ($this->definition->getBindings()) {
37
-
thrownewInvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also "bind" arguments.', $this->id));
thrownewInvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $service->getAttribute('id')));
231
-
}
232
-
233
-
foreach ($defaultsas$k => $v) {
234
-
if ('tags' === $k) {
235
-
// since tags are never inherited from parents, there is no confusion
236
-
// thus we can safely add them as defaults to ChildDefinition
237
-
continue;
238
-
}
239
-
if ('bind' === $k) {
240
-
if ($defaults['bind']) {
241
-
thrownewInvalidArgumentException(sprintf('Bound values on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file.', $service->getAttribute('id')));
242
-
}
243
-
244
-
continue;
245
-
}
246
-
if (!$service->hasAttribute($k)) {
247
-
thrownewInvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $service->getAttribute('id')));
thrownewInvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting autoconfigure="false" for the service.', $service->getAttribute('id')));
0 commit comments