Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[DependencyInjection] Improve reporting named autowiring aliases#50718
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
public function__construct(string $name) | ||
public functiongetParsedName(): string |
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.
should we even have it as a public method if calling it directly would be a mistake ?
nicolas-grekasJun 20, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 think yes. Calling it directly works, but only if you gave a name to the constructor.
d1abfdb
to741a50c
Comparei like the feature a lot. Thanks |
Thank you@nicolas-grekas. |
… that contain underscores (nicolas-grekas)This PR was merged into the 6.4 branch.Discussion----------[DependencyInjection] Fix parsing named autowiring aliases that contain underscores| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#52815| License | MITFixing a regression introduced in#50718Commits-------69a115c [DependencyInjection] Fix parsing named autowiring aliases that contain underscores
Uh oh!
There was an error while loading.Please reload this page.
This PR started as a fix of#48707 to improve the error message reported when
#[Target]
is used with an invalid target, and ended up with many other related improvements:Allow using
#[Target]
with no arguments. This has the effect of throwing an exception if the name of the argument that has the attribute doesn't match a named autowiring alias.Improve the error message when a target doesn't match:
debug:autowiring
to display the target name to use with#[Target]
: