From fa601f97d738d2280376739e23045f72d28b240b Mon Sep 17 00:00:00 2001 From: sj-i Date: Mon, 11 May 2020 10:11:27 +0900 Subject: [PATCH] update proc_open() types for PHP 7.4 (#3333) as of PHP 7.4, proc_open() accepts an array for its first argument. https://www.php.net/manual/en/function.proc-open.php#refsect1-function.proc-open-parameters --- src/Psalm/Internal/CallMap.php | 2 +- src/Psalm/Internal/CallMap_74_delta.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/CallMap.php b/src/Psalm/Internal/CallMap.php index 95798ed45b4..b39a960b208 100644 --- a/src/Psalm/Internal/CallMap.php +++ b/src/Psalm/Internal/CallMap.php @@ -10152,7 +10152,7 @@ 'proc_close' => ['int', 'process'=>'resource'], 'proc_get_status' => ['array|false', 'process'=>'resource'], 'proc_nice' => ['bool', 'priority'=>'int'], -'proc_open' => ['resource|false', 'command'=>'string', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'], +'proc_open' => ['resource|false', 'command'=>'string|array', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'], 'proc_terminate' => ['bool', 'process'=>'resource', 'signal='=>'int'], 'projectionObj::__construct' => ['void', 'projectionString'=>'string'], 'projectionObj::getUnits' => ['int'], diff --git a/src/Psalm/Internal/CallMap_74_delta.php b/src/Psalm/Internal/CallMap_74_delta.php index d8ecd9f2a0b..d280425f02c 100644 --- a/src/Psalm/Internal/CallMap_74_delta.php +++ b/src/Psalm/Internal/CallMap_74_delta.php @@ -17,10 +17,12 @@ 'new' => [ 'password_hash' => ['string|null', 'password'=>'string', 'algo'=>'int|string|null', 'options='=>'array'], 'password_needs_rehash' => ['bool', 'hash'=>'string', 'algo'=>'int|string|null', 'options='=>'array'], + 'proc_open' => ['resource|false', 'command'=>'string|array', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'], 'ReflectionProperty::getType' => ['?ReflectionType'], ], 'old' => [ 'password_hash' => ['string|false', 'password'=>'string', 'algo'=>'int', 'options='=>'array'], 'password_needs_rehash' => ['bool', 'hash'=>'string', 'algo'=>'int', 'options='=>'array'], + 'proc_open' => ['resource|false', 'command'=>'string', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'], ] ];