From b786f485b85d25b6a039cd22008227b3cb5270c6 Mon Sep 17 00:00:00 2001 From: Bill Ruddock Date: Wed, 1 Oct 2025 02:00:43 +0100 Subject: [PATCH] Stop playwright with default signals Remove need for ext-pcntl / ext-posix by using the default signals to stop playwright process. Default is to use SIGTERM, followed by a SIGKILL after the given timeout. --- composer.json | 2 -- src/Playwright/Servers/PlaywrightNpmServer.php | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 16c017d0..1c9ff64b 100644 --- a/composer.json +++ b/composer.json @@ -38,8 +38,6 @@ } }, "require-dev": { - "ext-pcntl": "*", - "ext-posix": "*", "livewire/livewire": "^3.6.4", "nunomaduro/collision": "^8.8.2", "orchestra/testbench": "^10.6.0", diff --git a/src/Playwright/Servers/PlaywrightNpmServer.php b/src/Playwright/Servers/PlaywrightNpmServer.php index 31c9febe..1bb19538 100644 --- a/src/Playwright/Servers/PlaywrightNpmServer.php +++ b/src/Playwright/Servers/PlaywrightNpmServer.php @@ -94,10 +94,7 @@ public function start(): void public function stop(): void { if ($this->systemProcess instanceof SystemProcess && $this->isRunning()) { - $this->systemProcess->stop( - timeout: 0.1, - signal: PHP_OS_FAMILY === 'Windows' ? null : SIGTERM, - ); + $this->systemProcess->stop(timeout: 0.1); } $this->systemProcess = null;