patchwork / dumper
The DebugBundle of Symfony 2.6 backported for 2.3+
Installs: 30 003
Dependents: 2
Suggesters: 0
Security: 0
Stars: 89
Watchers: 6
Forks: 10
Open Issues: 2
Requires
- php: >=5.3.3
- symfony/config: ~2.3
- symfony/dependency-injection: ~2.2
- symfony/event-dispatcher: ~2.3
- symfony/http-kernel: ~2.3
- symfony/var-dumper: ~2.6
Requires (Dev)
- twig/twig: ~1.12
Conflicts
- symfony/debug-bundle: >=2.6
This package is auto-updated.
Last update: 2021-12-22 18:33:37 UTC
README
This bundle provides a better dump()
function, that you can use instead of
var_dump()
, better meaning:
- per object and resource types specialized view: e.g. filter out Doctrine internals
while dumping a single proxy entity, or get more insight on opened files with
stream_get_meta_data()
; - ability to dump internal references, either soft ones (objects or resources)
or hard ones (
=&
on arrays or objects properties). Repeated occurrences of the same object/array/resource won't appear again and again anymore. Moreover, you'll be able to inspect the reference structure of your data. - ability to operate in the context of an output buffering handler.
- full exposure of the internal mechanisms used for walking through an arbitrary PHP data structure.
Calling dump($myVvar)
works in all PHP code and {% dump myVar %}
or
{{ dump(myVar) }}
in Twig templates.
Usage
The recommended way to use this package is through composer.
Just create a composer.json
file and run the php composer.phar install
command to install it:
{
"require": {
"tchwork/debug-bundle": "~1.4"
}
}
Then, enable the bundle in your app/AppKernel.php
, preferably only for the dev
and test environments:
public function registerBundles() { $bundles = array( // ... new \Symfony\Bundle\DebugBundle\DebugBundle(), ); }