-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Display option definition from a given form type #24208
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
I've used |
aea9fa1
to
d704551
Compare
Color is auto-enabled only when writing to a color-enabled output stream. You can force it, but then it's your responsibility to do it appropriately, see eg |
0a45775
to
b71aed9
Compare
@nicolas-grekas perfect thanks! color enabled. |
protected function describeOption(OptionsResolver $optionsResolver, array $options = array()) | ||
{ | ||
$this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); | ||
$this->dumper->setColors(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.
s/true/$this->output->isDecorated()/
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.
Fixed.
67cddf1
to
751de48
Compare
Is dumping a closure like the normalizer ones really useful? At least perhaps registering a dedicated caster to only keep file and line no? |
Status: Needs Work |
3c548a7
to
e9d49c2
Compare
9e90c8a
to
20e9af2
Compare
@nicolas-grekas: Regarding #24208 (comment), does this look okay to you? Thank you. |
006105f
to
c4e6958
Compare
I'm going to merge this (unless there is any objection) before feature freeze, so the whole |
I'd prefer to finish everything properly instead of rushing out anything. That would not make sense. We can still merge things next week if needed. there is no hard date. |
Alright :) |
c4e6958
to
4c07a0e
Compare
Just rebasing & resolving conflicts :) |
ed0986e
to
7b44ca0
Compare
7b44ca0
to
d6d187d
Compare
Thank you @yceruto. |
…e (yceruto, ogizanagi) This PR was merged into the 3.4 branch. Discussion ---------- [Form] Display option definition from a given form type | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes (deps=high failure expected) | Fixed tickets | - | License | MIT | Doc PR | -  Show friendly message if typo:  complement of #24185 Commits ------- d6d187d Add & use OptionResolverIntrospector 8bbb5e7 Add debug:form type option
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
This PR was submitted for the 6.4 branch but it was squashed and merged into the 5.4 branch instead. Discussion ---------- add `OptionsResolverIntrospector`usage doc <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Original commit : symfony/symfony@d6d187d Orignal PR : symfony/symfony#24208 Commits ------- 887f6f5 add `OptionsResolverIntrospector`usage doc
Show friendly message if typo:

complement of #24185