mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Merge pull request #7443 from brainlock/fix-proc-open-stub
fix proc_open stub for php >= 8.0
This commit is contained in:
commit
f9ea2756f9
@ -10291,7 +10291,7 @@ return [
|
||||
'proc_close' => ['int', 'process'=>'resource'],
|
||||
'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}', 'process'=>'resource'],
|
||||
'proc_nice' => ['bool', 'priority'=>'int'],
|
||||
'proc_open' => ['resource|false', 'cmd'=>'string|array', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'],
|
||||
'proc_open' => ['resource|false', 'command'=>'string|array', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'],
|
||||
'proc_terminate' => ['bool', 'process'=>'resource', 'signal='=>'int'],
|
||||
'projectionObj::__construct' => ['void', 'projectionString'=>'string'],
|
||||
'projectionObj::getUnits' => ['int'],
|
||||
|
@ -33,8 +33,8 @@ return [
|
||||
'new' => ['bool', 'hash'=>'string', 'algo'=>'int|string|null', 'options='=>'array'],
|
||||
],
|
||||
'proc_open' => [
|
||||
'old' => ['resource|false', 'command'=>'string', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'],
|
||||
'new' => ['resource|false', 'cmd'=>'string|array', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'],
|
||||
'old' => ['resource|false', 'command'=>'string', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'],
|
||||
'new' => ['resource|false', 'command'=>'string|array', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'],
|
||||
],
|
||||
],
|
||||
'removed' => [
|
||||
|
@ -14473,7 +14473,7 @@ return [
|
||||
'proc_close' => ['int', 'process'=>'resource'],
|
||||
'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}|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', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'],
|
||||
'proc_terminate' => ['bool', 'process'=>'resource', 'signal='=>'int'],
|
||||
'projectionObj::__construct' => ['void', 'projectionString'=>'string'],
|
||||
'projectionObj::getUnits' => ['int'],
|
||||
|
@ -18,5 +18,20 @@ class CoreStubsTest extends TestCase
|
||||
|
||||
new RecursiveArrayIterator([], RecursiveArrayIterator::CHILD_ARRAYS_ONLY);'
|
||||
];
|
||||
yield 'proc_open() named arguments' => [
|
||||
'<?php
|
||||
|
||||
proc_open(
|
||||
command: "ls",
|
||||
descriptor_spec: [],
|
||||
pipes: $pipes,
|
||||
cwd: null,
|
||||
env_vars: null,
|
||||
options: null
|
||||
);',
|
||||
'assertions' => [],
|
||||
'error_levels' => [],
|
||||
'php_version' => '8.0',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user