From b703277c341f368d048a07af113a155ea1641238 Mon Sep 17 00:00:00 2001 From: "Oe.Salim Duran" Date: Tue, 25 Oct 2022 17:14:44 +0200 Subject: [PATCH] - Update PHP version to 7.4 in composer. - Remove the unnecessary lines, declare(ticks=1) --- composer.json | 2 +- composer.lock | 6 +++--- src/Thread.php | 16 ++-------------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index a570d23..abcf3dd 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ } ], "require": { - "php": ">=5.6.0" + "php": ">=7.4.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 650cd75..2ab8c20 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "371512141531f38a907ed1a5fbe3055b", + "content-hash": "58c138d8f2f129f5bf6e4409d5c6c02b", "packages": [], "packages-dev": [], "aliases": [], @@ -13,8 +13,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6.0" + "php": ">=7.4.0" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/src/Thread.php b/src/Thread.php index 4bc505b..0a0a9d6 100644 --- a/src/Thread.php +++ b/src/Thread.php @@ -89,13 +89,7 @@ abstract class Thread */ protected function getChildren() { - if (function_exists('pcntl_signal_dispatch')) { - pcntl_signal_dispatch(); - } else { - declare(ticks=1) { - $true = true; - } - } + pcntl_signal_dispatch(); return $this->children; } @@ -126,13 +120,7 @@ abstract class Thread */ public function isStopped() { - if (function_exists('pcntl_signal_dispatch')) { - pcntl_signal_dispatch(); - } else { - declare(ticks=1) { - $true = true; - } - } + pcntl_signal_dispatch(); return $this->stopped; } -- 2.34.1