jeremykendall/doctrine-debug-helper

Convenience wrapper around \Doctrine\Common\Util\Debug::dump()

0.0.2 2015-01-12 16:38 UTC

This package is auto-updated.

Last update: 2024-11-25 07:17:41 UTC


README

The Doctrine Debug Helper is a set of convenience functions that wrap \Doctrine\Common\Util\Debug::dump(). Because lazy.

Installation

Use Composer to install Doctrine Debug Helper.

{
    "require": {
        "jeremykendall/doctrine-debug-helper": "*"
    }
}

dc() and dcd()

dc() and dcd() wrap \Doctrine\Common\Util\Debug::dump(), but use custom defaults. I much prefer a higher $maxDepth than 2 and I don't want the dump run through html_entity_decode. Since the point of these function is less typing, these functions provide the defaults that I prefer.

void dc($var, $maxDepth = 3, $stripTags = false)

Prints a dump of the public, protected and private properties of $var.

Uses custom defaults: $maxDepth defaults to 3 and $stripTags defaults to false.

void dcd($var, $maxDepth = 3, $stripTags = false)

Prints a dump of the public, protected and private properties of $var and dies.

Uses custom defaults: $maxDepth defaults to 3 and $stripTags defaults to false.

Recommendation

Do you even Xdebug?

In my opinion, \Doctrine\Common\Util\Debug::dump() is best when Xdebug is installed. You should be using Xdebug in development anyhow, so go install it now. NOW.