-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
The <bind> tag does not support inner collections #50046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does it work if you go with this? <bind key="$foo" type="collection">
<bind key="inner-collection" type="collection">
<bind>item-1</bind>
8000
<bind>item-2</bind>
</bind>
</bind> |
No, it won't work, because the second |
You can check the node types of |
OK, got it thanks. In order not to break BC, let's add the new line after the existing one and adapt the code to read from both tags, and include your fix? |
…en using `<bind>` (zerustech) This PR was merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Fix support for inner collections when using `<bind>` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #50046 | License | MIT Commits ------- 4634eeb [DependencyInjection] Fix support for inner collections when using `<bind>`
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.2.0
Description
The inner collection in the following code snippet is ignored:
How to reproduce
Bind a variable
$foo
with the following code snippet in a container configuration file, and try to dump this variable in a controller, the inner collection will be empty:Possible Solution
Change
Symfony\Component\DependencyInjection\Loader\XmlFileLoader
as follows:Additional Context
No response
The text was updated successfully, but these errors were encountered: