Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
components/var_dumper/advanced.rst Outdated
| 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. |
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.
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.
components/var_dumper/advanced.rst Outdated
| 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. |
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.
We should enclose HTMLDumper with double backticks and change it toHtmlDumper to reflect the actual class name.
components/var_dumper/advanced.rst Outdated
| * 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. |
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 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!
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 described the flags in more detail now and moved the section to the end of the paragraph. :)
components/var_dumper/advanced.rst Outdated
| 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. |
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.
Oh, can we please revert this change? :)
components/var_dumper/advanced.rst Outdated
| 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``. |
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.
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).
components/var_dumper/advanced.rst Outdated
| * If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed | ||
| next to its content. | ||
| :: |
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.
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.
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.
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).
components/var_dumper/advanced.rst Outdated
| * If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format. | ||
| :: |
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.
same here
components/var_dumper/advanced.rst Outdated
| // 0 => (4) "test" | ||
| // ] | ||
| * If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format. |
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.
Maybe add "similar to PHP's short array notation" in parentheses after "shortened format"?
sawmurai commentedDec 8, 2016
Thanks for all the help so far :) |
javiereguiluz left a comment
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.
👍@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 commentedApr 15, 2017
Thank you@sawmurai. |
…(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
* 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 ...
Pull request for ticket#7177