symfony/symfony — pull request #10640 by nicolas-grekas (2014-04-05 21:15:08+00:00)
Title: VarDebug component

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none

From a user land point of view, this PR creates a global `debug()` function that is to be used instead of `var_dump()`. The component can be used standalone in any dev workflow. Please see the provided README for details.

When used with the Framework bundle, variables passed to `debug()` are dumped in a new dedicated panel in the web toolbar. The function is also available in twig templates.

Regarding the implementation, I'm pretty sure you'll find a lot to comment. As I'm sure of nothing, not even the names of things, please do.

I tried to organize this PR in several commits, from the most fundamental algorithm to pure Symfony glue.
I suggest you follow this order while progressing in the review and the discussion around this PR, so that we can together validate commits one after the other.