-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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 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
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7b26e44
Document new environment variables and display options
sawmurai adbec6d
Reformat documentation and link to class doc.
sawmurai 9340846
Replaced the list to use an unordered list
javiereguiluz dfb6d6a
Trimmed some lines to respect the 80-char soft limit
javiereguiluz ad90321
Describe flags in more detail
sawmurai 6b2248e
Fix mention of file
sawmurai 0c46fce
Respect 80 chars line length
sawmurai 2ef1b60
Fix format
29080a6
Minor formatting changes
javiereguiluz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Document new environment variables and display options
- Loading branch information
commit 7b26e4482011cc00c455e99fc297b32b49fb2f51
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,12 @@ Dumpers | |
|
||
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 and are | ||
influenced 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. | ||
|
||
This component comes with an :class:`Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper` | ||
for HTML output and a :class:`Symfony\\Component\\VarDumper\\Dumper\\CliDumper` | ||
|
@@ -181,6 +186,21 @@ method. They also typically implement the | |
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 commentThe reason will be displayed to describe this comment to others. Learn more. We should enclose HTMLDumper with double backticks and change it to |
||
These options can be overriden by providing a third parameter when calling ``dump``:: | ||
|
||
use Symfony\Component\VarDumper\Dumper\HtmlDumper; | ||
|
||
$output = fopen('php://memory', 'r+b'); | ||
|
||
$dumper = new HtmlDumper(); | ||
$dumper->dump($var, $output, array( | ||
'maxDepth' => 1, | ||
'maxStringLength' => 160 | ||
)); | ||
|
||
// Limit nesting to 1 level and string length to 160 characters (default) | ||
|
||
Casters | ||
------- | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: