mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-17 15:52:51 +00:00
Fix Xdebug detection
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
</testsuites>
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<ini name="xdebug.overload_var_dump" value="0" />
|
||||
</php>
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
|
||||
@@ -22,10 +22,8 @@ final class DebugExtension extends AbstractExtension
|
||||
{
|
||||
// dump is safe if var_dump is overridden by xdebug
|
||||
$isDumpOutputHtmlSafe = \extension_loaded('xdebug')
|
||||
// false means that it was not set (and the default is on) or it explicitly enabled
|
||||
&& (false === \ini_get('xdebug.overload_var_dump') || \ini_get('xdebug.overload_var_dump'))
|
||||
// false means that it was not set (and the default is on) or it explicitly enabled
|
||||
// xdebug.overload_var_dump produces HTML only when html_errors is also enabled
|
||||
// Xdebug overloads var_dump in develop mode when html_errors is enabled
|
||||
&& str_contains(\ini_get('xdebug.mode'), 'develop')
|
||||
&& (false === \ini_get('html_errors') || \ini_get('html_errors'))
|
||||
|| 'cli' === \PHP_SAPI
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user