Skip to content

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 9 commits into from
Apr 15, 2017
Prev Previous commit
Next Next commit
Respect 80 chars line length
  • Loading branch information
sawmurai committed Dec 3, 2016
commit 0c46fce3215f0ee2c44222343eb8ad8950ab031c
18 changes: 11 additions & 7 deletions components/var_dumper/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ them from re-implementing the logic required to walk through a

The :class:`Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper` limits string
length and nesting depth of the output. These options can be overriden by
providing a third parameter when calling ``dump``::
providing a third parameter when calling
:method:`dump(Data $data) <Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface::dump>`
::

use Symfony\Component\VarDumper\Dumper\HtmlDumper;

Expand All @@ -197,11 +199,12 @@ providing a third parameter when calling ``dump``::

// Limit nesting to 1 level and string length to 160 characters (default)

The output format of a dumper can be fine tuned by the two flags ``DUMP_STRING_LENGTH``
and ``DUMP_LIGHT_ARRAY`` which are passed as a bitmap in the third constructor argument.
They can also be set via environment variables when using ``assertDumpEquals`` of the
:class:`Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait` during unit testing.
The flags can be configured in ``phpunit.xml.dist``.
The output format of a dumper can be fine tuned by the two flags
``DUMP_STRING_LENGTH`` and ``DUMP_LIGHT_ARRAY`` which are passed as a bitmap
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 the phpunit.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.
Expand Down Expand Up @@ -250,7 +253,8 @@ The flags can be configured in ``phpunit.xml.dist``.
// 0 => "test"
// ]

* If you would like to use both options, then you can just combine them by using a the logical OR operator ``|``.
* If you would like to use both options, then you can just
combine them by using a the logical OR operator ``|``.

::

Expand Down