!10 修复 php8.4 下:Implicitly marking parameter $env as nullable is deprecated

Merge pull request !10 from Abel/master
This commit is contained in:
Karson
2025-08-25 02:53:40 +00:00
committed by Gitee

View File

@@ -123,7 +123,7 @@ class Process
* @throws \RuntimeException
* @api
*/
public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = [])
public function __construct($commandline, $cwd = null, ?array $env = null, $input = null, $timeout = 60, array $options = [])
{
if (!function_exists('proc_open')) {
throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');