Skip to content

Commit

Permalink
Fix issue_#1700 again (#1703)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Jun 23, 2022
1 parent dbc0b43 commit c2f121b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions devTools/phpstan-src.neon
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ parameters:
path: '../src/Container.php'
message: '#^Method Infection\\Container::get.*\(\) should return .* but returns object\.$#'
count: 1
-
path: '../src/Process/OriginalPhpProcess.php'
message: '#Function ini_get is unsafe to use#'
-
path: '../src/TestFramework/Coverage/CoverageChecker.php'
message: '#Function ini_get is unsafe to use#'
Expand Down
9 changes: 1 addition & 8 deletions src/Process/OriginalPhpProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use Composer\XdebugHandler\PhpConfig;
use Composer\XdebugHandler\XdebugHandler;
use function extension_loaded;
use function ini_get as ini_get_unsafe;
use const PHP_SAPI;
use Symfony\Component\Process\Process;

Expand Down Expand Up @@ -82,14 +81,8 @@ private static function shallExtendEnvironmentWithXdebugMode(): bool
return false;
}

// We also do not need to add XDEBUG_MODE for Xdebug <=3:
// it had coverage enabled at all times and it didn't have `xdebug.mode`.
if (ini_get_unsafe('xdebug.mode') === false) {
return false;
}

// The last case: Xdebug 3+ running inactive.
return ini_get_unsafe('xdebug.mode') !== 'coverage';
return true;

// Why going through all the trouble above? We don't want to enable
// Xdebug when there are more compelling choices. In the end the user is
Expand Down

0 comments on commit c2f121b

Please sign in to comment.