-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Added a way to print or not comma separator and/or trailing comma #21653
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
a699b28
to
60c2a18
Compare
@@ -107,6 +107,92 @@ class: "Symfony\Component\VarDumper\Tests\CliDumperTest" | |||
); | |||
} | |||
|
|||
public function testGetWithCommaFlag() | |||
{ | |||
require __DIR__.'/Fixtures/dumb-var.php'; |
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 suggest to use a smaller fixture - one that contains a multiline string - and to test also the DUMP_TRAILING_COMMA
flag
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.
@@ -274,7 +360,7 @@ public function testThrowingCaster() | |||
%sTwig.php:2: { | |||
: foo bar | |||
: twig source | |||
: | |||
: |
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.
should be reverted (breaks tests)
dc30f7d
to
431d57c
Compare
…ng comma Usecase: Be able to display a dump on one line. It's already used in the following projets: https://github.com/bobthecow/psysh/blob/master/src/Psy/VarDumper/Dumper.php#L93-L95
431d57c
to
1ef0751
Compare
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.
👍
Thank you @lyrixx. |
…r and/or trailing comma (lyrixx) This PR was merged into the 3.3-dev branch. Discussion ---------- [VarDumper] Added a way to print or not comma separator and/or trailing comma | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - --- Usecase: Be able to display a dump on one line. It's already used in the following projets: https://github.com/bobthecow/psysh/blob/master/src/Psy/VarDumper/Dumper.php#L93-L95 Commits ------- 1ef0751 [VarDumper] Added a way to print or not comma separator and/or trailing comma
Usecase: Be able to display a dump on one line.
It's already used in the following projets: https://github.com/bobthecow/psysh/blob/master/src/Psy/VarDumper/Dumper.php#L93-L95