From a5d94015881824b275f08212e6063eaa879aa268 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Thu, 14 Apr 2022 13:04:16 +0200 Subject: [PATCH] PCNTL no longer needed --- build/composer-require-checker.json | 1 - src/Command/CommandHelper.php | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/build/composer-require-checker.json b/build/composer-require-checker.json index 75cb6d099e..05a759a45c 100644 --- a/build/composer-require-checker.json +++ b/build/composer-require-checker.json @@ -19,7 +19,6 @@ "Reflection", "SPL", "standard", - "pcntl", "mbstring", "hash", "tokenizer", diff --git a/src/Command/CommandHelper.php b/src/Command/CommandHelper.php index c3de7b2e84..e8d62e4995 100644 --- a/src/Command/CommandHelper.php +++ b/src/Command/CommandHelper.php @@ -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; @@ -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; @@ -62,7 +59,6 @@ use const DIRECTORY_SEPARATOR; use const E_ERROR; use const PHP_VERSION_ID; -use const SIGINT; class CommandHelper { @@ -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) { @@ -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 $loaderParameters