Skip to content

Commit b592e90

Browse files
[VarDumper] inline dump() function loading
1 parent cd076e4 commit b592e90

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

UPGRADE-2.6.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,18 @@ OptionsResolver
349349
// throws InvalidOptionsException
350350
$resolver->resolve(array('port' => '25'));
351351
```
352+
353+
VarDumper and DebugBundle
354+
-------------------------
355+
356+
The component and the bundle are new to Symfony 2.6. We encourage you
357+
to enable the bundle in your `app/AppKernel.php` for the *dev* or *test*
358+
environments. Just add this line before loading the `WebProfilerBundle`:
359+
360+
```php
361+
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
362+
```
363+
364+
Then enjoy dumping variables by calling `dump($var)` anywhere in your PHP
365+
and `{% dump var %}` or `{{ dump(var) }}` in Twig. Dumps are displayed
366+
**in the web debug toolbar**.

src/Symfony/Component/VarDumper/VarDumper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Symfony\Component\VarDumper\Dumper\CliDumper;
1616
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
1717

18+
// Load the global dump() function
19+
require_once __DIR__.'/Resources/functions/dump.php';
20+
1821
/**
1922
* @author Nicolas Grekas <[email protected]>
2023
*/

0 commit comments

Comments
 (0)