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] Add service and alias deprecation message to debug:container <name> output#46814
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
f68d488 to4afa6c5Compare This comment was marked as outdated.
This comment was marked as outdated.
What about showing the deprecation message as well? |
@ogizanagi it could indeed be a nice idea! But as there are lot of test files to update, I would prefer asking first a consensus before doing the proposed change if you dont mind :) |
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.
That's a very useful information. I like the idea of colored warning in case of depreciation.
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xmlShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@GromNaN@ogizanagi oki, I will try adding the deprecated message, and a colored output for when applicable |
f4ac1a4 to32562a8Compareogizanagi commentedJul 4, 2022 • 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.
@94noni : Sorry to make you change this again, I should have been clearer: |
@ogizanagi hey, do you mean like in my screenshot and written above the ! [Note] but as warning? if yes I can rework as requested :) |
@94noni : exactly what I meant :) |
8e2d3cd to6a30629Compare@ogizanagi@GromNaN PR reworked and description updated based on addressed comments :) |
Looks good to me. Can you please go ahead with the missing test(s)? |
@chalasr The only failed test I can see in the above checks is about |
Uh oh!
There was an error while loading.Please reload this page.
What I mean is that this feature should be covered by a test if possible |
| deprecated: | ||
| class:Symfony\Bundle\FrameworkBundle\Tests\Fixtures\DeprecatedClass | ||
| deprecated:The "%service_id%" service is deprecated since foo/bar 1.9 and will be removed in 2.0. Use "public" service instead. | ||
| deprecated_alias: |
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.
cfdoc
| private_alias: | ||
| alias:public | ||
| public:false | ||
| deprecated: |
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.
cf6e55d toe9a5d5cCompare4bb7984 to0f69408Comparestatus: needs review |
This PR was submitted for the 6.0 branch but it was merged into the 5.4 branch instead.Discussion----------Fix doc service deprecationHi,Based on [this PR](symfony/symfony#46814), I've followed [the doc](https://symfony.com/doc/current/service_container/alias_private.html#deprecating-services)But when tests executed, I got [this error](symfony/symfony#46814 (comment))So I propose to fix the doc accordingly hereThank youCommits-------ffdb7e6 Fix documentation on declaration of service deprecation in YAML format
With#38903 being recently merged there are lot of conflicts |
Uh oh!
There was an error while loading.Please reload this page.
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/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@94noni Can you rebase this PR to get rid of the merge commit (that prevents me from merging this PR)? |
@fabpot I'll handle this very soon and ping back |
eb6b62e to5a93272Compare…container <name> output
5a93272 to82054bcCompareThank you@94noni. |

Uh oh!
There was an error while loading.Please reload this page.
Hi, the
debug:containeris great to understand container's services in the appHaving this
deprecatedwarning can be valuable in such debug context, that is why I propose to add this on the outputFor ex with such definition: