@@ -42,8 +42,9 @@ use instead of e.g. :phpfunction:`var_dump`. By using it, you'll gain:
42
42
For example::
43
43
44
44
require __DIR__.'/vendor/autoload.php';
45
+
45
46
// create a variable, which could be anything!
46
- $someVar = ' ...' ;
47
+ $someVar = ...;
47
48
48
49
dump($someVar);
49
50
@@ -70,14 +71,14 @@ current PHP SAPI:
70
71
#. Run ``composer global require symfony/var-dumper ``;
71
72
#. Add ``auto_prepend_file = ${HOME}/.composer/vendor/autoload.php ``
72
73
to your ``php.ini `` file;
73
- #. From time to time, run ``composer global update `` to have the latest
74
- bug fixes.
74
+ #. From time to time, run ``composer global update symfony/var-dumper ``
75
+ to have the latest bug fixes.
75
76
76
77
DebugBundle and Twig Integration
77
78
--------------------------------
78
79
79
- The `` DebugBundle `` allows greater integration of the component into the
80
- Symfony full stack framework. It is enabled by default in the *dev * and *test *
80
+ The DebugBundle allows greater integration of the component into the Symfony
81
+ full stack framework. It is enabled by default in the *dev * and *test *
81
82
environment of the standard edition since version 2.6.
82
83
83
84
Since generating (even debug) output in the controller or in the model
@@ -98,43 +99,9 @@ Choosing between both is mostly a matter of personal taste, still:
98
99
be suited to your use case (e.g. you shouldn't use it in an HTML
99
100
attribute or a ``<script> `` tag).
100
101
101
- By default for nested variables, dumps are limited to a subset of their
102
- original value. You can configure the limits in terms of:
103
-
104
- * maximum number of items to dump,
105
- * maximum string length before truncation.
106
-
107
- Since dumping into the toolbar is not always possible - e.g. when working on a
108
- JSON API - you can have an alternate output destination for dumps. This is
109
- configurable with the ``debug.dump_destination `` option, that you can typically
110
- set to ``php://stderr ``.
111
-
112
- .. configuration-block ::
113
-
114
- .. code-block :: yaml
115
-
116
- debug :
117
- max_items : 250
118
- max_string_length : -1
119
- dump_destination : ~
120
-
121
- .. code-block :: xml
122
-
123
- <?xml version =" 1.0" encoding =" UTF-8" ?>
124
- <container xmlns =" http://symfony.com/schema/dic/debug"
125
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
126
- xsi : schemaLocation =" http://symfony.com/schema/dic/debug http://symfony.com/schema/dic/debug/debug-1.0.xsd" >
127
-
128
- <config max-items =" 250" max-string-length =" -1" dump-destination =" null" />
129
- </container >
130
-
131
- .. code-block :: php
132
-
133
- $container->loadFromExtension('debug', array(
134
- 'max_items' => 250,
135
- 'max_string_length' => -1,
136
- 'dump_destination' => null,
137
- ));
102
+ This behaviour can be changed by configuring the ``dump.dump_destination ``
103
+ option. Read more about this and other options in
104
+ :doc: `the DebugBundle configuration reference </reference/configuration/debug >`.
138
105
139
106
Dump Examples and Output
140
107
------------------------
0 commit comments