Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3faa1d5

Browse files
committed
bug #26677 Support phpdbg SAPI in Debug::enable() (hkdobrev)
This PR was squashed before being merged into the 2.7 branch (closes #26677). Discussion ---------- Support phpdbg SAPI in Debug::enable() | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | <!-- required for new features --> PHPDBG is a CLI PHP debugger which could be useful for debugging in development or for running PHPUnit tests with code coverage faster compared to XDebug. It has CLI characteristics, but it runs as a different SAPI. Commits ------- 49a144f Support phpdbg SAPI in Debug::enable()
2 parents 2349e97 + 49a144f commit 3faa1d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Debug/Debug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function enable($errorReportingLevel = null, $displayErrors = true
4545
error_reporting(-1);
4646
}
4747

48-
if ('cli' !== PHP_SAPI) {
48+
if (!in_array(PHP_SAPI, array('cli', 'phpdbg'))) {
4949
ini_set('display_errors', 0);
5050
ExceptionHandler::register();
5151
} elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {

0 commit comments

Comments
 (0)