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
bug #48958 [DependencyInjection] fixes validation of non-scalar attribute values (ju1ius)
This PR was squashed before being merged into the 6.2 branch.
Discussion
----------
[DependencyInjection] fixes validation of non-scalar attribute values
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#48956
| License | MIT
| Doc PR | None
As a follow-up to #47364, this PR updates the `CheckDefinitionValidityPass` to allow (possibly nested) arrays of scalars in service tags attribute values.
Please see #48956 for context.
Commits
-------
88b3e15 [DependencyInjection] fixes validation of non-scalar attribute values
thrownewInvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type or an array of scalar-type.', $tagName, $prefix.$attribute));
72
+
$name = implode('.', [...$path, $name]);
73
+
thrownewInvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type or an array of scalar-type.', $tag, $name));
thrownewInvalidArgumentException(sprintf('A tag attribute must be of a scalar-type or an array of scalar-types for service "%s", tag "%s", attribute "%s".', $this->id, $tagName, $prefix.$attribute));
42
+
$name = implode('.', [...$path, $name]);
43
+
thrownewInvalidArgumentException(sprintf('A tag attribute must be of a scalar-type or an array of scalar-types for service "%s", tag "%s", attribute "%s".', $this->id, $tag, $name));
0 commit comments