1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #9227 from othercorey/callmap-resources

Convert callmaps resource types
This commit is contained in:
orklah 2023-02-06 18:33:52 +01:00 committed by GitHub
commit 05bdeb2c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 19 deletions

View File

@ -12037,10 +12037,10 @@ return [
'SeekableIterator::rewind' => ['void'],
'SeekableIterator::seek' => ['void', 'position'=>'int'],
'SeekableIterator::valid' => ['bool'],
'sem_acquire' => ['bool', 'semaphore'=>'resource', 'non_blocking='=>'bool'],
'sem_get' => ['resource|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'int'],
'sem_release' => ['bool', 'semaphore'=>'resource'],
'sem_remove' => ['bool', 'semaphore'=>'resource'],
'sem_acquire' => ['bool', 'semaphore'=>'SysvSemaphore', 'non_blocking='=>'bool'],
'sem_get' => ['SysvSemaphore|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'bool'],
'sem_release' => ['bool', 'semaphore'=>'SysvSemaphore'],
'sem_remove' => ['bool', 'semaphore'=>'SysvSemaphore'],
'Serializable::__construct' => ['void'],
'Serializable::serialize' => ['?string'],
'Serializable::unserialize' => ['void', 'serialized'=>'string'],
@ -12300,7 +12300,7 @@ return [
'socket_addrinfo_bind' => ['Socket|false', 'address'=>'AddressInfo'],
'socket_addrinfo_connect' => ['Socket|false', 'address'=>'AddressInfo'],
'socket_addrinfo_explain' => ['array', 'address'=>'AddressInfo'],
'socket_addrinfo_lookup' => ['false|AddressInfo[]', 'host='=>'string|null', 'service='=>'mixed', 'hints='=>'array'],
'socket_addrinfo_lookup' => ['false|AddressInfo[]', 'host'=>'string', 'service='=>'?string', 'hints='=>'array'],
'socket_bind' => ['bool', 'socket'=>'Socket', 'addr'=>'string', 'port='=>'int'],
'socket_clear_error' => ['void', 'socket='=>'?Socket'],
'socket_close' => ['void', 'socket'=>'Socket'],
@ -12308,7 +12308,7 @@ return [
'socket_connect' => ['bool', 'socket'=>'Socket', 'addr'=>'string', 'port='=>'int'],
'socket_create' => ['Socket|false', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int'],
'socket_create_listen' => ['Socket|false', 'port'=>'int', 'backlog='=>'int'],
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'Socket[]'],
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_pair'=>'Socket[]'],
'socket_export_stream' => ['resource|false', 'socket'=>'Socket'],
'socket_get_option' => ['mixed|false', 'socket'=>'Socket', 'level'=>'int', 'optname'=>'int'],
'socket_get_status' => ['array', 'stream'=>'Socket'],

View File

@ -43,7 +43,7 @@ return [
'socket_addrinfo_bind' => ['?resource', 'addrinfo'=>'resource'],
'socket_addrinfo_connect' => ['resource', 'addrinfo'=>'resource'],
'socket_addrinfo_explain' => ['array', 'addrinfo'=>'resource'],
'socket_addrinfo_lookup' => ['resource[]', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'],
'socket_addrinfo_lookup' => ['resource[]', 'host'=>'string', 'service='=>'string', 'hints='=>'array'],
'sodium_add' => ['void', '&rw_string1'=>'string', 'string2'=>'string'],
'sodium_base642bin' => ['string', 'string'=>'string', 'id'=>'int', 'ignore='=>'string'],
'sodium_bin2base64' => ['string', 'string'=>'string', 'id'=>'int'],

View File

@ -1845,6 +1845,22 @@ return [
'old' => ['bool', 'stream'=>'resource', 'enable='=>'bool'],
'new' => ['bool', 'stream'=>'resource', 'enable='=>'?bool'],
],
'sem_acquire' => [
'old' => ['bool', 'semaphore'=>'resource', 'non_blocking='=>'bool'],
'new' => ['bool', 'semaphore'=>'SysvSemaphore', 'non_blocking='=>'bool'],
],
'sem_get' => [
'old' => ['resource|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'bool'],
'new' => ['SysvSemaphore|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'bool'],
],
'sem_release' => [
'old' => ['bool', 'semaphore'=>'resource'],
'new' => ['bool', 'semaphore'=>'SysvSemaphore'],
],
'sem_remove' => [
'old' => ['bool', 'semaphore'=>'resource'],
'new' => ['bool', 'semaphore'=>'SysvSemaphore'],
],
'session_cache_expire' => [
'old' => ['int', 'value='=>'int'],
'new' => ['int', 'value='=>'?int'],
@ -1922,8 +1938,8 @@ return [
'new' => ['array', 'address'=>'AddressInfo'],
],
'socket_addrinfo_lookup' => [
'old' => ['resource[]', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'],
'new' => ['false|AddressInfo[]', 'host='=>'string|null', 'service='=>'mixed', 'hints='=>'array'],
'old' => ['resource[]', 'host'=>'string', 'service='=>'string', 'hints='=>'array'],
'new' => ['false|AddressInfo[]', 'host'=>'string', 'service='=>'?string', 'hints='=>'array'],
],
'socket_bind' => [
'old' => ['bool', 'socket'=>'resource', 'addr'=>'string', 'port='=>'int'],
@ -1950,8 +1966,8 @@ return [
'new' => ['Socket|false', 'port'=>'int', 'backlog='=>'int'],
],
'socket_create_pair' => [
'old' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'resource[]'],
'new' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'Socket[]'],
'old' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_pair'=>'resource[]'],
'new' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_pair'=>'Socket[]'],
],
'socket_export_stream' => [
'old' => ['resource|false', 'socket'=>'resource'],

View File

@ -14796,7 +14796,7 @@ return [
'seaslog_get_author' => ['string'],
'seaslog_get_version' => ['string'],
'sem_acquire' => ['bool', 'semaphore'=>'resource', 'non_blocking='=>'bool'],
'sem_get' => ['resource|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'int'],
'sem_get' => ['resource|false', 'key'=>'int', 'max_acquire='=>'int', 'permissions='=>'int', 'auto_release='=>'bool'],
'sem_release' => ['bool', 'semaphore'=>'resource'],
'sem_remove' => ['bool', 'semaphore'=>'resource'],
'serialize' => ['string', 'value'=>'mixed'],
@ -14950,7 +14950,7 @@ return [
'socket_connect' => ['bool', 'socket'=>'resource', 'addr'=>'string', 'port='=>'int'],
'socket_create' => ['resource|false', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int'],
'socket_create_listen' => ['resource|false', 'port'=>'int', 'backlog='=>'int'],
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'resource[]'],
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_pair'=>'resource[]'],
'socket_export_stream' => ['resource|false', 'socket'=>'resource'],
'socket_get_option' => ['mixed|false', 'socket'=>'resource', 'level'=>'int', 'optname'=>'int'],
'socket_get_status' => ['array', 'stream'=>'resource'],

View File

@ -681,10 +681,6 @@ class InternalCallMapHandlerTest extends TestCase
'resourcebundle::create',
'resourcebundle::getlocales',
'sapi_windows_cp_get',
'sem_acquire',
'sem_get',
'sem_release',
'sem_remove',
'sessionhandler::gc',
'sessionhandler::open',
'shm_detach',
@ -705,11 +701,9 @@ class InternalCallMapHandlerTest extends TestCase
'snmp_set_enum_print',
'snmp_set_valueretrieval',
'snmpset',
'socket_addrinfo_lookup',
'socket_bind',
'socket_cmsg_space',
'socket_connect',
'socket_create_pair',
'socket_get_option',
'socket_getopt',
'socket_getpeername',