Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] improved message when alias service is not found#28449
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
nicolas-grekas commentedSep 11, 2018
Should be for master, isn't it? |
stof commentedSep 12, 2018
Indeed. We avoid doing such changes in patch releases generally. |
xabbuh commentedSep 13, 2018
rebased on |
nicolas-grekas commentedSep 17, 2018
Are the descriptor changes required? I mean: the pass will always catch this before descriptor ever hit this situation, isn't it? Would be great to reduce the complexity if possible. |
xabbuh commentedSep 17, 2018
Unfortunately, the pass is not executed when the command is run. All removal passes are disabled first. |
nicolas-grekas commentedSep 17, 2018
But the commands run after the container is compiled, isn't it? |
xabbuh commentedSep 17, 2018
It uses a container that is compiled without the removal passes: symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php Lines 199 to 203 in744bf0e
|
chalasr commentedSep 18, 2018
indeed, required for being able to list all available services including autowiring types |
nicolas-grekas left a comment
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, tested, I get it now. Here are some comments to fine tune the console output.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
3e31fb5 to7844a47CompareWhen using the YAML config format, it can be confusing that you need toprefix the aliased service id with an `@` character when passing it asa string, but that you have to omit it when using the `alias` attribute:```yamlfoo: '@app\Foo'foo: alias: 'App\Foo'```This commit will enhance the generated error message in cases where thealiased service id is prefixed with the `@` character in the `alias`option like this:```yamlfoo: alias: '@app\Foo'```
fabpot commentedSep 23, 2018
Thank you@xabbuh. |
…ice is not found (xabbuh)This PR was merged into the 4.2-dev branch.Discussion----------[DependencyInjection] improved message when alias service is not found| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#28413| License | MIT| Doc PR |When using the YAML config format, it can be confusing that you need toprefix the aliased service id with an `@` character when passing it asa string, but that you have to omit it when using the `alias` attribute:```yamlfoo: '@app\Foo'foo: alias: 'App\Foo'```This commit will enhance the generated error message in cases where thealiased service id is prefixed with the `@` character in the `alias`option like this:```yamlfoo: alias: '@app\Foo'```Commits-------280ecbc improved message when alias service is not found
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an
@character when passing it asa string, but that you have to omit it when using the
aliasattribute:This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the
@character in thealiasoption like this: