-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f68d488
to
4afa6c5
Compare
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.xml
Show resolved
Hide resolved
@GromNaN @ogizanagi oki, I will try adding the deprecated message, and a colored output for when applicable |
f4ac1a4
to
32562a8
Compare
@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
to
6a30629
Compare
@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 |
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.
cf doc
@@ -11,6 +11,15 @@ services: | |||
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
to
e9a5d5c
Compare
4bb7984
to
0f69408
Compare
status: 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 deprecation Hi, 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 here Thank you Commits ------- ffdb7e6 Fix documentation on declaration of service deprecation in YAML format
With #38903 being recently merged there are lot of conflicts |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
Outdated
Show resolved
Hide resolved
@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
to
5a93272
Compare
…container <name> output
5a93272
to
82054bc
Compare
Thank you @94noni. |
Hi, the
debug:container
is great to understand container's services in the appHaving this
deprecated
warning can be valuable in such debug context, that is why I propose to add this on the outputFor ex with such definition: