Skip to content

Commit

Permalink
PCNTL no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Apr 14, 2022
1 parent 790678c commit a5d9401
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion build/composer-require-checker.json
Expand Up @@ -19,7 +19,6 @@
"Reflection",
"SPL",
"standard",
"pcntl",
"mbstring",
"hash",
"tokenizer",
Expand Down
18 changes: 0 additions & 18 deletions src/Command/CommandHelper.php
Expand Up @@ -39,7 +39,6 @@
use function count;
use function dirname;
use function error_get_last;
use function function_exists;
use function get_class;
use function getcwd;
use function gettype;
Expand All @@ -51,8 +50,6 @@
use function is_readable;
use function is_string;
use function mkdir;
use function pcntl_async_signals;
use function pcntl_signal;
use function register_shutdown_function;
use function sprintf;
use function str_ends_with;
Expand All @@ -62,7 +59,6 @@
use const DIRECTORY_SEPARATOR;
use const E_ERROR;
use const PHP_VERSION_ID;
use const SIGINT;

class CommandHelper
{
Expand Down Expand Up @@ -354,7 +350,6 @@ public static function begin(
throw new InceptionNotSuccessfulException();
}

self::setUpSignalHandler($errorOutput);
/** @var bool|null $customRulesetUsed */
$customRulesetUsed = $container->getParameter('customRulesetUsed');
if ($customRulesetUsed === null) {
Expand Down Expand Up @@ -498,19 +493,6 @@ private static function executeBootstrapFile(
}
}

private static function setUpSignalHandler(Output $output): void
{
if (!function_exists('pcntl_signal')) {
return;
}

pcntl_async_signals(true);
pcntl_signal(SIGINT, static function () use ($output): void {
$output->writeLineFormatted('');
exit(1);
});
}

/**
* @param string[] $configFiles
* @param array<string, string> $loaderParameters
Expand Down

0 comments on commit a5d9401

Please sign in to comment.