From 5fef96e3e0881309e8253000cea1858c00a940c0 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 4 Dec 2024 17:57:30 +1300 Subject: [PATCH] Make nullable parameters explicity nullable for PHP 8.4 --- src/Process.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Process.php b/src/Process.php index d06b303..066684e 100644 --- a/src/Process.php +++ b/src/Process.php @@ -112,7 +112,7 @@ class Process extends EventEmitter * @param null|array $fds File descriptors to allocate for this process (or null = default STDIO streams) * @throws \LogicException On windows or when proc_open() is not installed */ - public function __construct($cmd, $cwd = null, array $env = null, array $fds = null) + public function __construct($cmd, $cwd = null, ?array $env = null, ?array $fds = null) { if (!\function_exists('proc_open')) { throw new \LogicException('The Process class relies on proc_open(), which is not available on your PHP installation.'); @@ -164,7 +164,7 @@ public function __construct($cmd, $cwd = null, array $env = null, array $fds = n * @param float $interval Interval to periodically monitor process state (seconds) * @throws \RuntimeException If the process is already running or fails to start */ - public function start(LoopInterface $loop = null, $interval = 0.1) + public function start(?LoopInterface $loop = null, $interval = 0.1) { if ($this->isRunning()) { throw new \RuntimeException('Process is already running');