Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
WIP [DebugBundle] Allow configuring a dumper while collecting dumps, add a default one writing to stderr when the cli-server is in use#14373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
shouldn't you just write tophp://stderr instead of using the dumper ? Having all the info about the string does not make much sense IMO, and it could even get truncated by the dumper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's a shortcut to benefit from auto-selection of color support, but yes, it's possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
but does it need to be colored as dumped strings ? It would be confusing in case the dumped value is also a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think so, but maybe in a different color/background. That's the kind of things we can tweak if the main idea is appealing to a majority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
the idea looks good to me
javiereguiluz commentedApr 16, 2015
👍 I like the idea. Mostly because I think it feels like the natural behavior that you'd expect when using the built-in web server and the My only concern is: will it become a mess if I output a lot of variables or few but complex variables? |
…olas-grekas)This PR was merged into the 2.6 branch.Discussion----------[DebugBundle] Allow alternative destination for dumps| Q | A| ------------- | ---| Bug fix? | yes| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#14608| License | MIT| Doc PR | -This PRfixes#14608 by adding a new `debug.dump_destination` configuration option to give users control over a stream destination where dumps will be written to.In HTTP mode, dumps are still/also collected in the toolbar.This supersedes#14627,#14631 and#14373Commits-------5f255e5 [DebugBundle] Allow alternative destination for dumps5368483 [DebugBundle] Use output mechanism of dumpers instead of echoing8cb2abb [DebugBundle] Always collect dumps
When

dump()is called, you all know this happens:With this PR, dumps are duplicated in the console output of a

php -Sprocess:This does not work with php app/console server:run but that is for an other PR.