Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Document new environment variables and display options#7217

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

Merged
xabbuh merged 9 commits intosymfony:3.2fromsawmurai:update-vardumper
Apr 15, 2017
Merged

Document new environment variables and display options#7217

xabbuh merged 9 commits intosymfony:3.2fromsawmurai:update-vardumper
Apr 15, 2017

Conversation

@sawmurai
Copy link
Contributor

Pull request for ticket#7177

If ``DUMP_STRING_LENGTH`` is set, then
the length of a string is displayed next to its content.
If ``DUMP_LIGHT_ARRAY`` is set,
then arrays are not displayed completely.
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to render the two sentences as a list? This would then look like this:

The destination and the formatting of this output vary with dumpers and areinfluenced by two environment variables:* If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed  next to its content.* If ``DUMP_LIGHT_ARRAY`` is set, then arrays are not displayed completely.

sawmurai reacted with thumbs up emoji
them from re-implementing the logic required to walk through a
:class:`Symfony\\Component\\VarDumper\\Cloner\\Data` object's internal structure.

The HTMLDumper limits string length and nesting depth of the output.
Copy link
Member

Choose a reason for hiding this comment

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

We should enclose HTMLDumper with double backticks and change it toHtmlDumper to reflect the actual class name.

sawmurai reacted with thumbs up emoji

* If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed
next to its content.
* If ``DUMP_LIGHT_ARRAY`` is set, then arrays are not displayed completely.
Copy link
Member

Choose a reason for hiding this comment

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

I don't fully understand the purpose of this option. Looking forDUMP_LIGHT_ARRAY in the code didn't help me either. What doesexactly this option do? Thanks!

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I described the flags in more detail now and moved the section to the end of the paragraph. :)

A dumper is responsible for outputting a string representation of a PHP variable,
using a:class:`Symfony\\Component\\VarDumper\\Cloner\\Data` object as input.
The destination and the formatting of this output vary with dumpers.
The destination and the formatting of this output vary with dumpers.
Copy link
Member

Choose a reason for hiding this comment

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

Oh, can we please revert this change? :)

in the third constructor argument. They can also be set via environment
variables when using
:method:`assertDumpEquals($dump, $data, $message) <Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait::assertDumpEquals>`
during unit testing. The flags can be configured in ``phpunit.xml.dist``.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should better say "in the PHPUnit configuration" (if you are working on a fork you will probably modify thephpunit.xml file to change the behaviour only locally).

* If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed
next to its content.

::
Copy link
Member

Choose a reason for hiding this comment

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

If you do not want to terminate the last sentence preceding a code example with a colon, you have to be more explicit and have to use.. code-block:: php instead of the double colon.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, and you will need to indent the whole code example by two additional spaces so that it is part of the list item (same for the other item and code example below).


* If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format.

::
Copy link
Member

Choose a reason for hiding this comment

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

same here

// 0 => (4) "test"
// ]

* If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add "similar to PHP's short array notation" in parentheses after "shortened format"?

@sawmurai
Copy link
ContributorAuthor

Thanks for all the help so far :)

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

👍@sawmurai I like this a lot. Thanks!

I've made some minor formatting changes because list of elements are not very readable when they are long, so I replaced it by regular paragraphs. Thanks!

@xabbuh
Copy link
Member

Thank you@sawmurai.

@xabbuhxabbuh merged commit29080a6 intosymfony:3.2Apr 15, 2017
xabbuh added a commit that referenced this pull requestApr 15, 2017
…(sawmurai, javiereguiluz, Fabian Becker)This PR was merged into the 3.2 branch.Discussion----------Document new environment variables and display optionsPull request for ticket#7177Commits-------29080a6 Minor formatting changes2ef1b60 Fix format0c46fce Respect 80 chars line length6b2248e Fix mention of filead90321 Describe flags in more detaildfb6d6a Trimmed some lines to respect the 80-char soft limit9340846 Replaced the list to use an unordered listadbec6d Reformat documentation and link to class doc.7b26e44 Document new environment variables and display options
xabbuh added a commit that referenced this pull requestApr 15, 2017
weaverryan added a commit that referenced this pull requestApr 15, 2017
* 3.2: (71 commits)  Rewriting the service container docs  Minor reword  Adding a tip for validation in forms without class  [#7217] add versionadded directives  [#7203] merge note and versionadded directive  Use the new configurator YAML syntax  Added a note about the .htaccess files included by Symfony apps  Made unmapped field example in forms chapter more descriptive  [#7507] fix namespace  [#7507] fix component name  [#7490] minor typo fix  Added a note about redirections to absolute URLs in tests  [#7204] link to API doc  Added docs for JsonResponse::fromJsonString  Added the changes suggested by reviewers  [#7620] use generate() in PHP templates before 2.8  Fixed the RST syntax  Improve example context  Minor formatting changes  [#7519] some minor tweaks  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@sawmurai@xabbuh@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp