1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Upgrade to xdebug-handler 2 (#9832)

This adds support for Xdebug3 modes and changes the default behaviour
from always restarting if Xdebug is loaded, to only restarting if Xdebug
is active.

Xdebug is considered active if it is loaded, and for Xdebug3, if it is
running in a mode other than `xdebug.mode=off`.
This commit is contained in:
John Stevenson 2021-04-13 08:59:06 +01:00 committed by GitHub
parent 180ba49f33
commit c3b76a8532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 12 deletions

View file

@ -13,6 +13,7 @@
namespace Composer\Test;
use Composer\Console\Application;
use Composer\XdebugHandler\XdebugHandler;
use Symfony\Component\Console\Output\OutputInterface;
class ApplicationTest extends TestCase
@ -54,7 +55,7 @@ class ApplicationTest extends TestCase
$outputMock->expects($this->at($index++))
->method("write");
if (extension_loaded('xdebug')) {
if (XdebugHandler::isXdebugActive()) {
$outputMock->expects($this->at($index++))
->method("getVerbosity")
->willReturn(OutputInterface::VERBOSITY_NORMAL);