Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash#25308
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
[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash#25308
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| foreach ($this->sortServiceIds($serviceIds)as$serviceId) { | ||
| $definition =$this->resolveServiceDefinition($builder,$serviceId); | ||
| if ('\\' ===substr($serviceId, -1)) { | ||
| $serviceId =substr($serviceId,0, -1); |
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.
But this means that the displayed service ID will be wrong, doesn't it?
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.
Yeah, you are right, we should escape without removing it. I was not thinking about that, it feels strange to have that kind of service, maybe we should do something before displaying it ?
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 you need to take a look at theOutputFormatter::escape() method
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.
Thanks@xabbuh that's what I needed!
987fbae toa9dbec8Comparea9dbec8 to890edf7Comparenicolas-grekas commentedDec 4, 2017
I'm removing the photo from the description, it's a bit weird to see your face when reviewing the PR :) |
Simperfit commentedDec 4, 2017 • 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.
@nicolas-grekas it's for 3.3 since the bug does not exist before. |
fabpot commentedDec 4, 2017
Thank you@Simperfit. |
…n when passing an antislash (Simperfit)This PR was merged into the 3.3 branch.Discussion----------[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#25193| License | MIT| Doc PR | noneYou can see in the [reproducer](Simperfit/symfony-reproducer@e6509ff) when running `bin/console debug:container` that there an error in the ouput (like in the issue) when using a class with `\` in the service name.This PR fix this wrong output. (even if that feels more developer thingy when there are xml everywhere ;)Commits-------890edf7 [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
Uh oh!
There was an error while loading.Please reload this page.
You can see in thereproducer when running
bin/console debug:containerthat there an error in the ouput (like in the issue) when using a class with\in the service name.This PR fix this wrong output. (even if that feels more developer thingy when there are xml everywhere ;)