8000 minor adjustments · symfony/symfony-docs@edb0ff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit edb0ff9

Browse files
minor adjustments
1 parent 6a3e170 commit edb0ff9

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

components/var_dumper/advanced.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ Before dumping it, you can further limit the resulting
3232
:method:`Symfony\\Component\\VarDumper\\Cloner\\Data::getLimitedClone`
3333
method:
3434

35-
- the first ``$maxDepth`` argument allows limiting dumps in the depth dimension,
36-
- the second ``$maxItemsPerDepth`` limits the number of items per depth level,
37-
- and the last ``$useRefHandles`` defaults to ``true`` but allows removing internal
35+
* the first ``$maxDepth`` argument allows limiting dumps in the depth dimension,
36+
* the second ``$maxItemsPerDepth`` limits the number of items per depth level,
37+
* and the last ``$useRefHandles`` defaults to ``true`` but allows removing internal
3838
objects' handles for sparser output,
39-
- but unlike the previous limits on cloners that remove data on purpose, these
39+
* but unlike the previous limits on cloners that remove data on purpose, these
4040
limits can be changed back and forth before dumping since they do not affect
4141
the intermediate representation internally.
4242

@@ -156,11 +156,11 @@ T 8000 hey are called in registration order.
156156
Casters are responsible for returning the properties of the object or resource
157157
being cloned in an array. They are callables that accept four arguments:
158158

159-
- the object or resource being casted,
160-
- an array modelled for objects after PHP's native ``(array)`` cast operator,
161-
- a :class:`Symfony\\Component\\VarDumper\\Cloner\\Stub` object
159+
* the object or resource being casted,
160+
* an array modelled for objects after PHP's native ``(array)`` cast operator,
161+
* a :class:`Symfony\\Component\\VarDumper\\Cloner\\Stub` object
162162
representing the main properties of the object (class, type, etc.),
163-
- true/false when the caster is called nested is a structure or not.
163+
* true/false when the caster is called nested is a structure or not.
164164

165165
Here is a simple caster not doing anything::
166166

components/var_dumper/introduction.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,47 @@ Installation
1717

1818
You can install the component in 2 different ways:
1919

20-
- :doc:`Install it via Composer </components/using_components>` (``symfony/var-dumper`` on `Packagist`_);
21-
- Use the official Git repository (https://github.com/symfony/var-dumper).
20+
* :doc:`Install it via Composer </components/using_components>` (``symfony/var-dumper`` on `Packagist`_);
21+
* Use the official Git repository (https://github.com/symfony/var-dumper).
2222

23-
The dump() function
23+
The dump() Function
2424
-------------------
2525

2626
The VarDumper component creates a global ``dump()`` function that you can
2727
use instead of e.g. :phpfunction:`var_dump`. By using it, you'll gain:
2828

29-
- per object and resource types specialized view to e.g. filter out
29+
* Per object and resource types specialized view to e.g. filter out
3030
Doctrine internals while dumping a single proxy entity, or get more
31-
insight on opened files with :phpfunction:`stream_get_meta_data()`.
32-
- configurable output formats: HTML or colored command line output.
33-
- ability to dump internal references, either soft ones (objects or
31+
insight on opened files with :phpfunction:`stream_get_meta_data()`;
32+
* Configurable output formats: HTML or colored command line output;
33+
* Ability to dump internal references, either soft ones (objects or
3434
resources) or hard ones (``=&`` on arrays or objects properties).
3535
Repeated occurrences of the same object/array/resource won't appear
3636
again and again anymore. Moreover, you'll be able to inspect the
37-
reference structure of your data.
38-
- ability to operate in the context of an output buffering handler.
37+
reference structure of your data;
38+
* Ability to operate in the context of an output buffering handler.
3939

40-
``dump()`` is just a thin wrapper for
41-
:method:`VarDumper::dump() <Symfony\\Component\\VarDumper\\VarDumper::dump>`
42-
so can you also use it directly.
40+
``dump()`` is just a thin wrapper and more convenient way to call
41+
:method:`VarDumper::dump() <Symfony\\Component\\VarDumper\\VarDumper::dump>`.
4342
You can change the behavior of this function by calling
4443
:method:`VarDumper::setHandler($callable) <Symfony\\Component\\VarDumper\\VarDumper::setHandler>`:
4544
calls to ``dump()`` will then be forwarded to ``$callable``.
4645

47-
Output format and destination
46+
Output Format and Destination
4847
-----------------------------
4948

5049
If you read the `advanced documentation <advanced>`, you'll learn how to
5150
change the format or redirect the output to wherever you want.
5251

5352
By default, these are selected based on your current PHP SAPI:
5453

55-
- on the command line (CLI SAPI), the output is written on ``STDERR``. This
54+
* On the command line (CLI SAPI), the output is written on ``STDERR``. This
5655
can be surprising to some because this bypasses PHP's output buffering
5756
mechanism. On the other hand, it give the possibility to easily split
58-
dumps from regular output by using pipe redirection.
59-
- on other SAPIs, dumps are written as HTML on the regular output.
57+
dumps from regular output by using pipe redirection;
58+
* On other SAPIs, dumps are written as HTML on the regular output.
6059

61-
DebugBundle and Twig integration
60+
DebugBundle and Twig Integration
6261
--------------------------------
6362

6463
The ``DebugBundle`` allows greater integration of the component into the
@@ -76,17 +75,18 @@ or a fatal error occurred, then dumps are written on the regular output.
7675
In a Twig template, two constructs are available for dumping a variable.
7776
Choosing between both is mostly a matter of personal taste, still:
7877

79-
- ``{% dump foo.bar %}`` is the way to go when the original template output
78+
* ``{% dump foo.bar %}`` is the way to go when the original template output
8079
shall not be modified: variables are not dumped inline, but in the web
81-
debug toolbar.
82-
- on the contrary, ``{{ dump(foo.bar) }}`` dumps inline and thus may or not
80+
debug toolbar;
81+
* on the contrary, ``{{ dump(foo.bar) }}`` dumps inline and thus may or not
8382
be suited to your use case (e.g. you shouldn't use it in an HTML
8483
attribute or a ``<script>`` tag).
8584

8685
By default for nested variables, dumps are limited to a subset of their
8786
original value. You can configure the limits in terms of:
88-
- maximum number of items to dump,
89-
- maximum string length before truncation.
87+
88+
* maximum number of items to dump,
89+
* maximum string length before truncation.
9090

9191
.. configuration-block::
9292

@@ -106,7 +106,7 @@ original value. You can configure the limits in terms of:
106106
<config max-items="250" max-string-length="-1" />
107107
</container>
108108
109-
Reading a dump
109+
Reading a Dump
110110
--------------
111111

112112
For simple variables, reading the output should be straightforward::

0 commit comments

Comments
 (0)
0