Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
debug:container --types (classes/interfaces)#22624
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
| $tableRows =array(); | ||
| foreach ($this->sortServiceIds($serviceIds)as$serviceId) { | ||
| $definition =$this->resolveServiceDefinition($builder,$serviceId); | ||
| $styledServiceId =sprintf('<fg=cyan>%s</fg=cyan>',$serviceId); |
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.
This was an extra thing I snuck in to help prettify the output (see screenshot). I want the service id to "jump out" a bit more.
chalasr commentedMay 3, 2017
The fact we have Also the main title says |
weaverryan commentedMay 3, 2017
@chalasr Great suggestion! This is now simply |
| $tableHeaders =array_merge(array('Service ID'),$tagsNames,array('Class name')); | ||
| $tableRows =array(); | ||
| $rawOutput =isset($options['raw_output']) &&$options['raw_output']; |
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.
Shouldn't it rather beraw_text, or both maybe?
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're right - i've updated it. I usedraw_output because that's what was used inAbstractDescriptorText. I've changed it toraw_output and updated that test to also requestraw_output. I don't know a ton about this area of the code.
| <info>php %command.full_name% --filter=port</info> | ||
| EOF | ||
| ) |
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.
This has been fixed meanwhile#22626
| returnfalse; | ||
| } | ||
| returnclass_exists($serviceId) ||interface_exists($serviceId); |
nicolas-grekasMay 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.
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.
interface_exists($serviceId, false); (no need to trigger autoload a 2nd time)
weaverryan commentedMay 4, 2017
Updated! |
chalasr 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.
👍
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.
👍
fabpot commentedMay 4, 2017
Thank you@weaverryan. |
This PR was squashed before being merged into the 3.3-dev branch (closes#22624).Discussion----------debug:container --types (classes/interfaces)| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | none, but needed insymfony/symfony-docs#7807| License | MIT| Doc PR | n/aIn Symfony 3.3, the *type* (i.e. class/interface) is the most important thing about a service. But, we don't have a way for the user to know *what* types are available. This builds on top of `debug:container` to make `debug:container --types`:<img width="1272" alt="screen shot 2017-05-03 at 3 42 37 pm" src="https://cloud.githubusercontent.com/assets/121003/25678671/8bebacaa-3018-11e7-9cf6-b7654e2cae88.png">I think we need this for 3.3, so I've made the diff as *small* as possible. We could make improvements for 3.4, but just *having* this is the most important. I could even remove `format` support to make the diff smaller.~~This depends on#22385, which fixes a "bug" where private services aren't really shown.~~Thanks!Commits-------25a39c2 debug:container --types (classes/interfaces)
This PR was merged into the master branch.Discussion----------Updates to DI config for 3.3Hi guys!WIP changes the new DI changes in 3.3! Woohoo! Some notes for myself:This relates to, oh, just these 10+ issues :). Assume they will all be closed by this one PR - before merge, if any of them aren't covered, I'll remove them.TODOS later (some might already be done)- update to use `debug:container --types` (symfony/symfony#22624)- update all other documents for possible changes for autowiring and autoconfigure- new page for existing Symfony users to explain the changes- update autowire section to talk about using aliases- document instanceof and also the ability to add configuration to the PSR4 loader- some links in the controller go to the API docs of `Controller`. But this is wrong, the methodsnow live in `ControllerTrait`... but the API docs for traits is basically broken:http://api.symfony.com/master/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.html- how should we pass a parameter to a controller?- do Twig extensions still need to be public? If so, the example in `service_container` about autoconfigure is still not quite rightDefinitely included in this PR*#7544*#7482*#7339*#7672Not included in this PR (but related to DI changes)*#7329*#7782*#7777*#7706*#7608*#7538*#7441*#7255* ~~#7041~~* ~~#7445~~* ~~#7444~~* ~~#7436~~Commits-------22adfbd removing duplicate target12c4944 Tweaks after amazing review from@GuilhemN and@xabbuhcac3c6c Merge remote-tracking branch 'origin/master' into di-3.3-changes2229fd3 Merge remote-tracking branch 'origin/master' into di-3.3-changes5452c61 Adding section about public: falseee27765 Adding versionaddedbc7088d Merge remote-tracking branch 'origin/di-3.3-changes' into di-3.3-changes443aec2 Merge pull request#7857 from GuilhemN/patch-189e12de bad link6de83e2 fixing build problem759e9b2 last tweaks from feedback45500b3 Adding details and usages of fetching the service as a controller arg70178d1 adding note about autoconfigure6e6ed94 more tweaks0e48bd8 [WIP] Updates to DI config for 3.39ab27f0 Add xml files2636bea bad linkc45daf4 fixing build problem9e84572 last tweaks from feedback049df7d Adding details and usages of fetching the service as a controller arg105801c adding note about autoconfigure2d11347 more tweaks8433fc1 [WIP] Updates to DI config for 3.3
TomasVotruba commentedMay 10, 2017
Beautiful work@weaverryan ! |
Uh oh!
There was an error while loading.Please reload this page.
In Symfony 3.3, thetype (i.e. class/interface) is the most important thing about a service. But, we don't have a way for the user to knowwhat types are available. This builds on top of
debug:containerto makedebug:container --types:I think we need this for 3.3, so I've made the diff assmall as possible. We could make improvements for 3.4, but justhaving this is the most important. I could even remove
formatsupport to make the diff smaller.This depends on#22385, which fixes a "bug" where private services aren't really shown.Thanks!