-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[6.3] non-existent resolver Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver #50081
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
Maybe your DoctrineBundle does not include doctrine/DoctrineBundle#1624? It was added in the 2.9.0 version. |
I can confirm that the file at: contains <service id="doctrine.orm.entity_value_resolver" class="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver">
<argument type="service" id="doctrine" />
<argument type="service" id="doctrine.orm.entity_value_resolver.expression_language" on-invalid="ignore" />
<tag name="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver" priority="110">controller.argument_value_resolver</tag>
</service> The composer.json having contained |
Okay it seems it has to do with #36586 as the |
The syntax mentioned in #36586 does no longer work, but the following does: <tag name="controller.argument_value_resolver" priority="110">
<attribute name="name">Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver</attribute>
</tag> Also the documentation is wrong because an |
The documentation is not wrong actually. There is only a special case when wanting to add an attribute named |
however, the documentation should probably cover that special case, which is not the case right now. |
Given symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php Lines 658 to 663 in 24b1b02
<tag name="app.mail_transport">
<attribute>sendmail</attribute>
<attribute>anotherAlias</attribute>
</tag> I thought #36586 allowed to have a |
Ok, apparently, the documentation was updated in the wrong way after #36586 (contrary to the comment on symfony/symfony-docs#13613 saying that the doc did not needed any update) |
I opened #50088 to illustrate the cause of this bug. The actual state of the documentation is another issue ( |
Thanks for your time investigating this. Really appreciate it personally, but seems like it could have been a bigger issue if it had not been caught now. |
Closing as fixed by proposed PR #50088 |
I don’t think the issue would have been bigger (one patch version away?), but it’s indeed better if features added in 6.3 work when it is released 😁 So thanks for testing! |
…when it does not define their name (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Do not ignore tags `name` attribute when it does not define their name | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #50081 | License | MIT | Doc PR | N/A Tags `name` attribute is ignored using XML if the tag name is its node content. That means `<tag name="name_attribute">tag_name</tag>` will return a `tag_name` tag without any attribute. This seems to be a regression from #36586. Commits ------- 4c9c688 [DependencyInjection] Do not ignore tags `name` attribute when it does not define their name
…(MatTheCat) This PR was merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Fix XML tag array attribute example Fixes #17932 (and closes #17395) Spotted in symfony/symfony#50081 (comment) The syntax is a bit awkward but it is how it works for now. Commits ------- 7ccec46 Fix XML tag array attribute example
Symfony version(s) affected
6.3.x-dev
Description
I had a fully working 6.2 app and I upgraded to 6.3.x-dev as a test.
My controller has some new (and working in 6.2)
MapEntity
attributes likeSince
[HttpKernel] Introduce pinnable value resolvers with #[ValueResolver] and #[AsPinnedValueResolver]
#48992 was merged I now get this errorSorry way beyond me...
Ping @MatTheCat
How to reproduce
Here is a reproducer - https://github.com/PhilETaylor/mapentity_reproducer
To create this reproducer I did
Possible Solution
Pay @MatTheCat some sponsorship... incoming.... Edit: No sponsor button :-(
Additional Context
I can "fix" this for my own purposes with this in services.php so maybe its a tagging issue?
The text was updated successfully, but these errors were encountered: