-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Support @>
as a shorthand for !service_closure
in YamlFileLoader
#59257
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
Conversation
chx
commented
Dec 18, 2024
•
edited by GromNaN
Loading
edited by GromNaN
Q | A |
---|---|
Branch? | 7.3 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Issues | Fix #59255 |
License | MIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the idea, but I don't like this new symbol.
- It creates an extra way of doing the same thing.
- It's not expressive: impossible to search for these special characters in the doc to understand what they do.
- It looks like the symbol
@>
in Postgres that is a totally different feature.
...ny/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_short_service_closure.yml
Outdated
Show resolved
Hide resolved
@>
as a shorthand for !service_closure
in YamlFileLoader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me
but let's add test cases with @>?bar
(and make it work)
src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
Outdated
Show resolved
Hide resolved
I'm also not so sure if we need this shortcut. The |
Yet I would not like to have to use |
@>
as a shorthand for !service_closure
in YamlFileLoader@>
as a shorthand for !service_closure
in YamlFileLoader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if that is convenient.
...ny/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_short_service_closure.yml
Outdated
Show resolved
Hide resolved
…in YamlFileLoader (Issue symfony#59255)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the remaining comments and added a line to the changelog of the component.
Thank you @chx. |
@>
as a shorthand for !service_closure
in YamlFileLoader@>
as a shorthand for !service_closure
in YamlFileLoader