-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Debug] Symfony debug extension #10500
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,21 @@ | |||
<?php | |||
$br = (php_sapi_name() == "cli")? "":"<br>"; |
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.
missing headers?
What's the relation to symfony? |
The first short term use of this function is porting https://github.com/nicolas-grekas/Patchwork-Dumper to Symfony Debug component. With a target for enhancing the debug toolbar. Patchwork Dumper relies on an algorithm that allows exploring soft and hard references in arbitrary PHP structures. But PHP has no primitive to make this happen easily (== fast and memory efficient). |
Given that such extension does not have any PHP counter-part, I find it weird to include it in the same repo than the PHP code while it requires a separate installation process (for Twig, the same feature is provided without the extension and the algorithms must stay in sync, so it is fine to have it in the repo). Thus, the function is not even specific to Symfony. So IMO, it should be maintained in a separate repo (or even contributed to XDebug if possible, to have a single debugging extension instead of 2). |
I also don't really think it belongs into symfony since it's not symfony specific. |
We've been told to merge it here by @fabpot , so let's wait for his answer, so that he will clarify all this. Thx. |
I didn't explain well: the dumper is already implemented in pure PHP. That won't change. And when this extension is enabled, it could be used to gain a LOT of performance. This compares to the twig extension on this point: not required, but you gain perf. when enabled. Does it belong to Symfony? What is Symfony? It's not a full stack framework. We are talking here of the Debug component. Symfony is dedicated to give powerful tools to PHP developers. A debug extension, that hooks into the PHP engine to give more information to devs is a very good thing. For your question about |
👍 |
@nicolas-grekas I don't disagree about having it as part of Symfony (I suggested contributing it to XDebug to have a single debugging extension needing to be installed, but this is not a blocker for me). But IMO, the C extension should probably live inside its own repo |
Replaced by #10640 |
Add a
symfony_zval_info($key, $array, $options = 0)
function in a PHP extension written in C, that:Please see the provided README for more info.