Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Feb 17, 2017

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

@@ -107,6 +107,92 @@ class: "Symfony\Component\VarDumper\Tests\CliDumperTest"
);
}

public function testGetWithCommaFlag()
{
require __DIR__.'/Fixtures/dumb-var.php';
Copy link
Member

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

Copy link
Member Author

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
:
:
Copy link
Member

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)

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Feb 18, 2017
@lyrixx lyrixx force-pushed the var-dumper-comma branch 2 times, most recently from dc30f7d to 431d57c Compare February 20, 2017 10:10
…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
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fabpot
Copy link
Member

fabpot commented Feb 20, 2017

Thank you @lyrixx.

@fabpot fabpot merged commit 1ef0751 into symfony:master Feb 20, 2017
fabpot added a commit that referenced this pull request Feb 20, 2017
…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
@lyrixx lyrixx deleted the var-dumper-comma branch February 20, 2017 17:03
@fabpot fabpot mentioned this pull request May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants