-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Debug container environment variables #27684
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
screenshot updated and JSON version included. I think the data set is pretty nice, and leaves us figuring out how to display processors/processed value in the text table without cluttering output too much. Still need to extract the actual prefixes though :) |
text version conceptually ready :) |
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 really like this one and I would like to get it for 4.2. @ro0NL Can you finish it? Any comments @nicolas-grekas
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
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.
Actually, do we need the json/xml descriptors?
I'm not sure they're useful, but I'm sure they're costly to maintain.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
Outdated
Show resolved
Hide resolved
not really, do you suggest to throw from any format other then text? |
Throwing an exception sounds good to me. |
aiming for
|
screenshots updated |
i dropped JSON support as well, no real need for a machine format to inspect/debug envs. They are bound to the current environment/runtime anyway. |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
Outdated
Show resolved
Hide resolved
@ro0NL Any chance to finish this one for 4.3? :) |
This PR was squashed before being merged into the 4.3-dev branch (closes #28898). Discussion ---------- [Console] Add dumper | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#10502 This PR adds a new `Dumper` helper in the Console component. As there are 2 types of dumps - debug purpose (e.g. `dd()`, `dump()`) - output purpose (see #24208, #27684) For the latter we cannot use the global system (debug) dumper, i.e. `VarDumper::dump()`, we need something tied to the current output and dependency free. Here it is: ```php $io = new SymfonyStyle($input, $output); $dumper = new Dumper($io); $io->writeln($dumper([-0.5, 0, 1])); $io->writeln($dumper(new \stdClass())); $io->writeln($dumper(123)); $io->writeln($dumper('foo')); $io->writeln($dumper(null)); $io->writeln($dumper(true)); ``` With VarDumper comonent:  Without:  > #27684 (comment) var-dumper is not a mandatory dep of fwb, can we do without? Now we can :) Commits ------- fc7465c [Console] Add dumper
@ro0NL What needs to be done before merging? |
@fabpot ready. Failures unrelated. |
Thank you @ro0NL. |
…s (ro0NL) This PR was squashed before being merged into the 4.3-dev branch (closes #27684). Discussion ---------- [FrameworkBundle] Debug container environment variables | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This PR is an attempt to ease debugging environment variables used by the container. Main purpose is to tell which are missing and show detailed usage information.   Commits ------- b813a05 [FrameworkBundle] Debug container environment variables
This PR is an attempt to ease debugging environment variables used by the container. Main purpose is to tell which are missing and show detailed usage information.