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 --deprecations on debug:container command#32584
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] add --deprecations on debug:container command#32584
Uh oh!
There was an error while loading.Please reload this page.
Conversation
e504ade to2728a8dCompare5f14174 toad4acacCompare
yceruto 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.
When the deprecation message is too large, the output is unreadable. Could we format that message? or do we have an option in the table helper to set the width of the column?
BTW very useful command, thanks!
src/Symfony/Bundle/FrameworkBundle/Command/DebugDeprecationsCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/DebugDeprecationsCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJul 17, 2019 • 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.
I would remove the table and take inspiration from the reports from the bridge if that makes sense. |
Simperfit commentedJul 17, 2019 via email
I will check that ! Thanks.Maybe we could call it DebugContainerCompiledDeprecation (that’s big ;))Le mer. 17 juil. 2019 à 20:13, Nicolas Grekas <notifications@github.com> aécrit : … I would remove the table and take inspiration from the reports from the bridge if that makes sense. Also, the name might be confision: this is only about deprecations triggered during compile+warmup. There can be many more. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#32584?email_source=notifications&email_token=AA2KV4WMVDFWA6X4D66R5ZTP75OOLA5CNFSM4IESRN3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2GEDOY#issuecomment-512508347>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA2KV4RMDLA4FXBFFRWAA3TP75OOLANCNFSM4IESRN3A> . |
ed04eb3 tob21cc72CompareSimperfit commentedJul 17, 2019
@nicolas-grekas updated according to the bridge |
src/Symfony/Bundle/FrameworkBundle/Command/DebugWarmedDeprecationsCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
4f156ea to43f18cdCompareSimperfit commentedJul 22, 2019
cc@yceruto WDYT ? |
src/Symfony/Bundle/FrameworkBundle/Command/DebugDeprecationsWarmedCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/DebugDeprecationsWarmedCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
43f18cd toc27ad7aComparenicolas-grekas commentedJul 23, 2019 • 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.
|
Simperfit commentedJul 23, 2019 • 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 I've taken this symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php Lines 99 to 107 in2ab1521
I think this is really the deprecation collected during cache warmup. |
nicolas-grekas commentedJul 23, 2019
Oh, sorry I forgot about that :) |
Simperfit commentedJul 23, 2019
Since we collect the same logs during container compilations, I think it does too |
nicolas-grekas commentedJul 23, 2019
So do, |
c27ad7a to77d5061Compare8ba1bda to6f00187CompareSimperfit commentedAug 9, 2019
PR rebased and comments fixed. |
Simperfit commentedAug 13, 2019
cc@yceruto |
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
6f00187 to4b62442CompareSimperfit commentedAug 14, 2019 • 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.
PR updated and ready ! |
fabpot commentedAug 18, 2019
Why don't we supported all formats (JSON, Markdown and XML)? |
Simperfit commentedAug 19, 2019
I don't see the need of getting this information in JSON for example ATM. |
fabpot commentedAug 19, 2019
The support for many formats is for integration with third-party tools. |
fabpot commentedSep 27, 2019
@Simperfit Do you have to finish this PR? We won't merge it if we don't support all formats. Or maybe someone else can take over to finish it, it should not be too time consuming. |
4b62442 to9a97e33Comparenicolas-grekas commentedSep 27, 2019
FYI, I rebased your branch |
| $formattedLogs = []; | ||
| $remainingCount =0; | ||
| foreach ($logsas$log) { | ||
| $formattedLogs[] =sprintf("%sx: %s\n in %s:%s",$log['count'],$log['message'],$log['file'],$log['line']); |
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.
we should use<href=%s>%s:%d</> here, to generate IDE links (which means using the FileLinkFormatter service to compute it)
| /** | ||
| * Describes container deprecations. | ||
| */ |
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.
can be removed
| $name =$this->findProperServiceName($input,$errorIo,$object,$name,$input->getOption('show-hidden')); | ||
| $options = ['id' =>$name]; | ||
| }elseif ($input->getOption('deprecations')) { | ||
| $options = ['deprecations' =>true]; |
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.
validateInput() needs to be updated to forbid combining this option with others.
fabpot commentedFeb 4, 2020
Any news here? Anyone willing to take over? |
nicolas-grekas commentedFeb 4, 2020
Closing as stale, anyone willing to help, please start from this PR. |
noemi-salaun commentedMar 7, 2020
I'll try implementing missing formats (md, json and xml) |
…r command (Simperfit, noemi-salaun)This PR was merged into the 5.1-dev branch.Discussion----------[FrameworkBundle] add --deprecations on debug:container command| Q | A| ------------- | ---| Branch? | master (5.1)| Bug fix? | no| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets |#30089 <!-- prefix each issue number with "Fix #", if any -->| License | MIT| Doc PR | todo_I apologize in advance, I am not fluent in English_Continuity of@Simperfit work from his PR#32584I added support for XML, JSON and markdown formats as well as unit tests for all formats.## XML format```xml<?xml version="1.0" encoding="UTF-8"?><deprecations remainingCount="5"> <deprecation count="3"> <message>Some deprecation message.</message> <file>/path/to/some/file.php</file> <line>39</line> </deprecation> <deprecation count="2"> <message>An other deprecation message.</message> <file>/path/to/an/other/file.php</file> <line>25</line> </deprecation></deprecations>```## JSON format```json{ "remainingCount": 5, "deprecations": [ { "message": "Some deprecation message.", "file": "\/path\/to\/some\/file.php", "line": 39, "count": 3 }, { "message": "An other deprecation message.", "file": "\/path\/to\/an\/other\/file.php", "line": 25, "count": 2 } ]}```## Markdown format## Remaining deprecations (5)- 3x: "Some deprecation message." in /path/to/some/file.php:39- 2x: "An other deprecation message." in /path/to/an/other/file.php:25I added a new commit on top of@Simperfit 's one, but I don't know how you would like to have the git history writed.Commits-------ee6391e [FrameworkBundle] add all formats support for debug:container --deprecations command161f659 [FrameworkBundle] add --deprecations on debug:container command
Uh oh!
There was an error while loading.Please reload this page.
Two question for this:
is a table output enough ?Edit: new output
