Install psalm as dev, sync scripts updates

This commit is contained in:
Clemens Schwaighofer
2023-03-09 16:27:10 +09:00
parent 6bec59e387
commit feba79a2e8
2099 changed files with 283333 additions and 32 deletions

15907
vendor/vimeo/psalm/dictionaries/CallMap.php vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,76 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 7.1 to php 7.0 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that did not exist prior to PHP 7.1
* The 'removed' section contains the signatures that were removed in php 7.1.
* The 'changed' section contains functions for which the signature has changed for php 7.1.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP before 7.1 and in PHP 7.1, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'Closure::fromCallable' => ['Closure', 'callback'=>'callable'],
'curl_multi_errno' => ['int|false', 'mh'=>'resource'],
'curl_share_errno' => ['int|false', 'sh'=>'resource'],
'curl_share_strerror' => ['?string', 'error_code'=>'int'],
'getenv\'1' => ['array<string,string>'],
'hash_hkdf' => ['non-empty-string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
'is_iterable' => ['bool', 'value'=>'mixed'],
'openssl_get_curve_names' => ['list<string>'],
'pcntl_async_signals' => ['bool', 'enable='=>'bool'],
'pcntl_signal_get_handler' => ['int|string', 'signal'=>'int'],
'sapi_windows_cp_conv' => ['?string', 'in_codepage'=>'int|string', 'out_codepage'=>'int|string', 'subject'=>'string'],
'sapi_windows_cp_get' => ['int', 'kind='=>'string'],
'sapi_windows_cp_is_utf8' => ['bool'],
'sapi_windows_cp_set' => ['bool', 'codepage'=>'int'],
'session_create_id' => ['string', 'prefix='=>'string'],
'session_gc' => ['int|false'],
],
'changed' => [
'DateTimeZone::listIdentifiers' => [
'old' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string'],
'new' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string|null'],
],
'IntlDateFormatter::format' => [
'old' => ['string|false', 'value'=>'IntlCalendar|DateTime|array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int}|array{tm_sec: int, tm_min: int, tm_hour: int, tm_mday: int, tm_mon: int, tm_year: int, tm_wday: int, tm_yday: int, tm_isdst: int}|string|int|float'],
'new' => ['string|false', 'value'=>'IntlCalendar|DateTimeInterface|array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int}|array{tm_sec: int, tm_min: int, tm_hour: int, tm_mday: int, tm_mon: int, tm_year: int, tm_wday: int, tm_yday: int, tm_isdst: int}|string|int|float'],
],
'SQLite3::createFunction' => [
'old' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int'],
'new' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int', 'flags='=>'int'],
],
'get_headers' => [
'old' => ['array|false', 'url'=>'string', 'associative='=>'int'],
'new' => ['array|false', 'url'=>'string', 'associative='=>'int', 'context='=>'?resource'],
],
'getopt' => [
'old' => ['array<string,string|false|list<string|false>>|false', 'short_options'=>'string', 'long_options='=>'array'],
'new' => ['array<string,string|false|list<string|false>>|false', 'short_options'=>'string', 'long_options='=>'array', '&w_rest_index='=>'int'],
],
'pg_fetch_all' => [
'old' => ['array<array>', 'result'=>'resource'],
'new' => ['array<array>', 'result'=>'resource', 'mode='=>'int'],
],
'pg_select' => [
'old' => ['string|array|false', 'connection'=>'resource', 'table_name'=>'string', 'conditions'=>'array', 'flags='=>'int'],
'new' => ['string|array|false', 'connection'=>'resource', 'table_name'=>'string', 'conditions'=>'array', 'flags='=>'int', 'mode='=>'int'],
],
'timezone_identifiers_list' => [
'old' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string'],
'new' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'?string'],
],
'unpack' => [
'old' => ['array', 'format'=>'string', 'string'=>'string'],
'new' => ['array|false', 'format'=>'string', 'string'=>'string', 'offset='=>'int'],
],
],
'removed' => [
],
];

View File

@@ -0,0 +1,255 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 7.2 to php 7.1 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 7.1
* The 'removed' section contains the signatures that were removed in php 7.2.
* The 'changed' section contains functions for which the signature has changed for php 7.2.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 7.1 and in PHP 7.2, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'DOMNodeList::count' => ['int'],
'ReflectionClass::isIterable' => ['bool'],
'ZipArchive::count' => ['int'],
'ZipArchive::setEncryptionIndex' => ['bool', 'index'=>'int', 'method'=>'string', 'password='=>'string'],
'ZipArchive::setEncryptionName' => ['bool', 'name'=>'string', 'method'=>'int', 'password='=>'string'],
'ftp_append' => ['bool', 'ftp'=>'resource', 'remote_filename'=>'string', 'local_filename'=>'string', 'mode='=>'int'],
'hash_hmac_algos' => ['list<string>'],
'imagebmp' => ['bool', 'image'=>'resource', 'file='=>'resource|string|null', 'compressed='=>'int'],
'imagecreatefrombmp' => ['resource|false', 'filename'=>'string'],
'imageopenpolygon' => ['bool', 'image'=>'resource', 'points'=>'array', 'num_points'=>'int', 'color'=>'int'],
'imageresolution' => ['array|bool', 'image'=>'resource', 'resolution_x='=>'int', 'resolution_y='=>'int'],
'imagesetclip' => ['bool', 'image'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int'],
'ldap_exop' => ['resource|bool', 'ldap'=>'resource', 'request_oid'=>'string', 'request_data='=>'?string', 'controls='=>'array|null', '&w_response_data='=>'string', '&w_response_oid='=>'string'],
'ldap_exop_passwd' => ['bool|string', 'ldap'=>'resource', 'user='=>'string', 'old_password='=>'string', 'new_password='=>'string'],
'ldap_exop_refresh' => ['int|false', 'ldap'=>'resource', 'dn'=>'string', 'ttl'=>'int'],
'ldap_exop_whoami' => ['string|false', 'ldap'=>'resource'],
'ldap_parse_exop' => ['bool', 'ldap'=>'resource', 'result'=>'resource', '&w_response_data='=>'string', '&w_response_oid='=>'string'],
'mb_chr' => ['non-empty-string|false', 'codepoint'=>'int', 'encoding='=>'string'],
'mb_convert_encoding\'1' => ['array', 'string'=>'array', 'to_encoding'=>'string', 'from_encoding='=>'mixed'],
'mb_ord' => ['int|false', 'string'=>'string', 'encoding='=>'string'],
'mb_scrub' => ['string', 'string'=>'string', 'encoding='=>'string'],
'oci_register_taf_callback' => ['bool', 'connection'=>'resource', 'callback='=>'callable'],
'oci_unregister_taf_callback' => ['bool', 'connection'=>'resource'],
'sapi_windows_vt100_support' => ['bool', 'stream'=>'resource', 'enable='=>'bool'],
'socket_addrinfo_bind' => ['?resource', 'addrinfo'=>'resource'],
'socket_addrinfo_connect' => ['resource', 'addrinfo'=>'resource'],
'socket_addrinfo_explain' => ['array', 'addrinfo'=>'resource'],
'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'],
'sodium_bin2hex' => ['string', 'string'=>'string'],
'sodium_compare' => ['int', 'string1'=>'string', 'string2'=>'string'],
'sodium_crypto_aead_aes256gcm_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_aes256gcm_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_aes256gcm_is_available' => ['bool'],
'sodium_crypto_aead_aes256gcm_keygen' => ['non-empty-string'],
'sodium_crypto_aead_chacha20poly1305_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['non-empty-string'],
'sodium_crypto_aead_chacha20poly1305_keygen' => ['non-empty-string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['non-empty-string'],
'sodium_crypto_auth' => ['string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_auth_keygen' => ['non-empty-string'],
'sodium_crypto_auth_verify' => ['bool', 'mac'=>'string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_box' => ['string', 'message'=>'string', 'nonce'=>'string', 'key_pair'=>'string'],
'sodium_crypto_box_keypair' => ['string'],
'sodium_crypto_box_keypair_from_secretkey_and_publickey' => ['string', 'secret_key'=>'string', 'public_key'=>'string'],
'sodium_crypto_box_open' => ['string|false', 'ciphertext'=>'string', 'nonce'=>'string', 'key_pair'=>'string'],
'sodium_crypto_box_publickey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_box_publickey_from_secretkey' => ['string', 'secret_key'=>'string'],
'sodium_crypto_box_seal' => ['string', 'message'=>'string', 'public_key'=>'string'],
'sodium_crypto_box_seal_open' => ['string|false', 'ciphertext'=>'string', 'key_pair'=>'string'],
'sodium_crypto_box_secretkey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_box_seed_keypair' => ['string', 'seed'=>'string'],
'sodium_crypto_generichash' => ['string', 'message'=>'string', 'key='=>'string', 'length='=>'int'],
'sodium_crypto_generichash_final' => ['string', '&state'=>'string', 'length='=>'int'],
'sodium_crypto_generichash_init' => ['string', 'key='=>'string', 'length='=>'int'],
'sodium_crypto_generichash_keygen' => ['non-empty-string'],
'sodium_crypto_generichash_update' => ['true', '&rw_state'=>'string', 'message'=>'string'],
'sodium_crypto_kdf_derive_from_key' => ['string', 'subkey_length'=>'int', 'subkey_id'=>'int', 'context'=>'string', 'key'=>'string'],
'sodium_crypto_kdf_keygen' => ['non-empty-string'],
'sodium_crypto_kx_client_session_keys' => ['array<int,string>', 'client_key_pair'=>'string', 'server_key'=>'string'],
'sodium_crypto_kx_keypair' => ['string'],
'sodium_crypto_kx_publickey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_kx_secretkey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_kx_seed_keypair' => ['string', 'seed'=>'string'],
'sodium_crypto_kx_server_session_keys' => ['array<int,string>', 'server_key_pair'=>'string', 'client_key'=>'string'],
'sodium_crypto_pwhash' => ['string', 'length'=>'int', 'password'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int', 'algo='=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256' => ['string', 'length'=>'int', 'password'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256_str' => ['string', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify' => ['bool', 'hash'=>'string', 'password'=>'string'],
'sodium_crypto_pwhash_str' => ['string', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_str_needs_rehash' => ['bool', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_str_verify' => ['bool', 'hash'=>'string', 'password'=>'string'],
'sodium_crypto_scalarmult' => ['string', 'n'=>'string', 'p'=>'string'],
'sodium_crypto_scalarmult_base' => ['string', 'secret_key'=>'string'],
'sodium_crypto_secretbox' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_secretbox_keygen' => ['non-empty-string'],
'sodium_crypto_secretbox_open' => ['string|false', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => ['string', 'header'=>'string', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_init_push' => ['array', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['non-empty-string'],
'sodium_crypto_secretstream_xchacha20poly1305_pull' => ['array', '&r_state'=>'string', 'ciphertext'=>'string', 'additional_data='=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_push' => ['string', '&w_state'=>'string', 'message'=>'string', 'additional_data='=>'string', 'tag='=>'int'],
'sodium_crypto_secretstream_xchacha20poly1305_rekey' => ['void', '&w_state'=>'string'],
'sodium_crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_shorthash_keygen' => ['non-empty-string'],
'sodium_crypto_sign' => ['string', 'message'=>'string', 'secret_key'=>'string'],
'sodium_crypto_sign_detached' => ['string', 'message'=>'string', 'secret_key'=>'string'],
'sodium_crypto_sign_ed25519_pk_to_curve25519' => ['string', 'public_key'=>'string'],
'sodium_crypto_sign_ed25519_sk_to_curve25519' => ['string', 'secret_key'=>'string'],
'sodium_crypto_sign_keypair' => ['string'],
'sodium_crypto_sign_keypair_from_secretkey_and_publickey' => ['string', 'secret_key'=>'string', 'public_key'=>'string'],
'sodium_crypto_sign_open' => ['string|false', 'signed_message'=>'string', 'public_key'=>'string'],
'sodium_crypto_sign_publickey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_sign_publickey_from_secretkey' => ['string', 'secret_key'=>'string'],
'sodium_crypto_sign_secretkey' => ['string', 'key_pair'=>'string'],
'sodium_crypto_sign_seed_keypair' => ['string', 'seed'=>'string'],
'sodium_crypto_sign_verify_detached' => ['bool', 'signature'=>'string', 'message'=>'string', 'public_key'=>'string'],
'sodium_crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_stream_keygen' => ['non-empty-string'],
'sodium_crypto_stream_xor' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_hex2bin' => ['string', 'string'=>'string', 'ignore='=>'string'],
'sodium_increment' => ['void', '&rw_string'=>'string'],
'sodium_memcmp' => ['int', 'string1'=>'string', 'string2'=>'string'],
'sodium_memzero' => ['void', '&w_string'=>'string'],
'sodium_pad' => ['string', 'string'=>'string', 'block_size'=>'int'],
'sodium_unpad' => ['string', 'string'=>'string', 'block_size'=>'int'],
'stream_isatty' => ['bool', 'stream'=>'resource'],
'xdebug_info' => ['mixed', 'category='=>'string'],
],
'changed' => [
'ReflectionClass::getMethods' => [
'old' => ['list<ReflectionMethod>', 'filter='=>'int'],
'new' => ['list<ReflectionMethod>', 'filter='=>'?int'],
],
'ReflectionClass::getProperties' => [
'old' => ['list<ReflectionProperty>', 'filter='=>'int'],
'new' => ['list<ReflectionProperty>', 'filter='=>'?int'],
],
'ReflectionObject::getMethods' => [
'old' => ['ReflectionMethod[]', 'filter='=>'int'],
'new' => ['ReflectionMethod[]', 'filter='=>'?int'],
],
'ReflectionObject::getProperties' => [
'old' => ['ReflectionProperty[]', 'filter='=>'int'],
'new' => ['ReflectionProperty[]', 'filter='=>'?int'],
],
'SQLite3::openBlob' => [
'old' => ['resource|false', 'table'=>'string', 'column'=>'string', 'rowid'=>'int', 'dbname='=>'string'],
'new' => ['resource|false', 'table'=>'string', 'column'=>'string', 'rowid'=>'int', 'database='=>'string', 'flags='=>'int'],
],
'hash_copy' => [
'old' => ['resource', 'context'=>'resource'],
'new' => ['HashContext', 'context'=>'HashContext'],
],
'hash_final' => [
'old' => ['non-empty-string', 'context'=>'resource', 'raw_output='=>'bool'],
'new' => ['non-empty-string', 'context'=>'HashContext', 'binary='=>'bool'],
],
'hash_init' => [
'old' => ['resource', 'algo'=>'string', 'options='=>'int', 'key='=>'string'],
'new' => ['HashContext|false', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],
],
'hash_update' => [
'old' => ['bool', 'context'=>'resource', 'data'=>'string'],
'new' => ['bool', 'context'=>'HashContext', 'data'=>'string'],
],
'hash_update_file' => [
'old' => ['bool', 'hcontext'=>'resource', 'filename'=>'string', 'scontext='=>'resource'],
'new' => ['bool', 'context'=>'HashContext', 'filename'=>'string', 'stream_context='=>'resource'],
],
'hash_update_stream' => [
'old' => ['int', 'context'=>'resource', 'handle'=>'resource', 'length='=>'int'],
'new' => ['int', 'context'=>'HashContext', 'stream'=>'resource', 'length='=>'int'],
],
'json_decode' => [
'old' => ['mixed', 'json'=>'string', 'associative='=>'bool', 'depth='=>'int', 'flags='=>'int'],
'new' => ['mixed', 'json'=>'string', 'associative='=>'?bool', 'depth='=>'int', 'flags='=>'int'],
],
'mb_check_encoding' => [
'old' => ['bool', 'value='=>'string', 'encoding='=>'string'],
'new' => ['bool', 'value='=>'array|string', 'encoding='=>'string'],
],
'preg_quote' => [
'old' => ['string', 'str'=>'string', 'delimiter='=>'string'],
'new' => ['string', 'str'=>'string', 'delimiter='=>'?string'],
],
],
'removed' => [
'Sodium\add' => ['void', '&left'=>'string', 'right'=>'string'],
'Sodium\bin2hex' => ['string', 'binary'=>'string'],
'Sodium\compare' => ['int', 'left'=>'string', 'right'=>'string'],
'Sodium\crypto_aead_aes256gcm_decrypt' => ['string|false', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_aes256gcm_encrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_aes256gcm_is_available' => ['bool'],
'Sodium\crypto_aead_chacha20poly1305_decrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_chacha20poly1305_encrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_auth' => ['string', 'msg'=>'string', 'key'=>'string'],
'Sodium\crypto_auth_verify' => ['bool', 'mac'=>'string', 'msg'=>'string', 'key'=>'string'],
'Sodium\crypto_box' => ['string', 'msg'=>'string', 'nonce'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_keypair' => ['string'],
'Sodium\crypto_box_keypair_from_secretkey_and_publickey' => ['string', 'secretkey'=>'string', 'publickey'=>'string'],
'Sodium\crypto_box_open' => ['string', 'msg'=>'string', 'nonce'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_publickey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_box_publickey_from_secretkey' => ['string', 'secretkey'=>'string'],
'Sodium\crypto_box_seal' => ['string', 'message'=>'string', 'publickey'=>'string'],
'Sodium\crypto_box_seal_open' => ['string', 'encrypted'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_secretkey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_box_seed_keypair' => ['string', 'seed'=>'string'],
'Sodium\crypto_generichash' => ['string', 'input'=>'string', 'key='=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_final' => ['string', 'state'=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_init' => ['string', 'key='=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_update' => ['bool', '&hashState'=>'string', 'append'=>'string'],
'Sodium\crypto_kx' => ['string', 'secretkey'=>'string', 'publickey'=>'string', 'client_publickey'=>'string', 'server_publickey'=>'string'],
'Sodium\crypto_pwhash' => ['string', 'out_len'=>'int', 'passwd'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256' => ['string', 'out_len'=>'int', 'passwd'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256_str' => ['string', 'passwd'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256_str_verify' => ['bool', 'hash'=>'string', 'passwd'=>'string'],
'Sodium\crypto_pwhash_str' => ['string', 'passwd'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_str_verify' => ['bool', 'hash'=>'string', 'passwd'=>'string'],
'Sodium\crypto_scalarmult' => ['string', 'ecdhA'=>'string', 'ecdhB'=>'string'],
'Sodium\crypto_scalarmult_base' => ['string', 'sk'=>'string'],
'Sodium\crypto_secretbox' => ['string', 'plaintext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_secretbox_open' => ['string', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'],
'Sodium\crypto_sign' => ['string', 'message'=>'string', 'secretkey'=>'string'],
'Sodium\crypto_sign_detached' => ['string', 'message'=>'string', 'secretkey'=>'string'],
'Sodium\crypto_sign_ed25519_pk_to_curve25519' => ['string', 'sign_pk'=>'string'],
'Sodium\crypto_sign_ed25519_sk_to_curve25519' => ['string', 'sign_sk'=>'string'],
'Sodium\crypto_sign_keypair' => ['string'],
'Sodium\crypto_sign_keypair_from_secretkey_and_publickey' => ['string', 'secretkey'=>'string', 'publickey'=>'string'],
'Sodium\crypto_sign_open' => ['string|false', 'signed_message'=>'string', 'publickey'=>'string'],
'Sodium\crypto_sign_publickey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_sign_publickey_from_secretkey' => ['string', 'secretkey'=>'string'],
'Sodium\crypto_sign_secretkey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_sign_seed_keypair' => ['string', 'seed'=>'string'],
'Sodium\crypto_sign_verify_detached' => ['bool', 'signature'=>'string', 'msg'=>'string', 'publickey'=>'string'],
'Sodium\crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_stream_xor' => ['string', 'plaintext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\hex2bin' => ['string', 'hex'=>'string'],
'Sodium\increment' => ['string', '&nonce'=>'string'],
'Sodium\library_version_major' => ['int'],
'Sodium\library_version_minor' => ['int'],
'Sodium\memcmp' => ['int', 'left'=>'string', 'right'=>'string'],
'Sodium\memzero' => ['void', '&target'=>'string'],
'Sodium\randombytes_buf' => ['string', 'length'=>'int'],
'Sodium\randombytes_random16' => ['int|string'],
'Sodium\randombytes_uniform' => ['int', 'upperBoundNonInclusive'=>'int'],
'Sodium\version_string' => ['string'],
],
];

View File

@@ -0,0 +1,118 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 7.3 to php 7.2 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 7.2
* The 'removed' section contains the signatures that were removed in php 7.3.
* The 'changed' section contains functions for which the signature has changed for php 7.3.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 7.2 and in PHP 7.3, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'DateTime::createFromImmutable' => ['static', 'object'=>'DateTimeImmutable'],
'JsonException::__clone' => ['void'],
'JsonException::__construct' => ['void'],
'JsonException::__toString' => ['string'],
'JsonException::__wakeup' => ['void'],
'JsonException::getCode' => ['int'],
'JsonException::getFile' => ['string'],
'JsonException::getLine' => ['int'],
'JsonException::getMessage' => ['string'],
'JsonException::getPrevious' => ['?Throwable'],
'JsonException::getTrace' => ['list<array{file?:string,line?:int,function:string,class?:class-string,type?:\'::\'|\'->\',args?:array<mixed>}>'],
'JsonException::getTraceAsString' => ['string'],
'Normalizer::getRawDecomposition' => ['?string', 'string'=>'string', 'form='=>'int'],
'SplPriorityQueue::isCorrupted' => ['bool'],
'array_key_first' => ['int|string|null', 'array'=>'array'],
'array_key_last' => ['int|string|null', 'array'=>'array'],
'fpm_get_status' => ['array|false'],
'gc_status' => ['array{runs:int,collected:int,threshold:int,roots:int}'],
'gmp_binomial' => ['GMP|false', 'n'=>'GMP|string|int', 'k'=>'int'],
'gmp_kronecker' => ['int', 'num1'=>'GMP|string|int', 'num2'=>'GMP|string|int'],
'gmp_lcm' => ['GMP', 'num1'=>'GMP|string|int', 'num2'=>'GMP|string|int'],
'gmp_perfect_power' => ['bool', 'num'=>'GMP|string|int'],
'hrtime' => ['array{0:int,1:int}|false', 'as_number='=>'false'],
'hrtime\'1' => ['int|float|false', 'as_number='=>'true'],
'is_countable' => ['bool', 'value'=>'mixed'],
'normalizer_get_raw_decomposition' => ['string|null', 'string'=>'string', 'form='=>'int'],
'net_get_interfaces' => ['array<string,array<string,mixed>>|false'],
'openssl_pkey_derive' => ['string|false', 'public_key'=>'mixed', 'private_key'=>'mixed', 'key_length='=>'?int'],
'session_set_cookie_params\'1' => ['bool', 'options'=>'array{lifetime?:?int,path?:?string,domain?:?string,secure?:?bool,httponly?:?bool,samesite?:?string}'],
'setcookie\'1' => ['bool', 'name'=>'string', 'value='=>'string', 'options='=>'array'],
'setrawcookie\'1' => ['bool', 'name'=>'string', 'value='=>'string', 'options='=>'array'],
'socket_wsaprotocol_info_export' => ['string|false', 'socket'=>'resource', 'process_id'=>'int'],
'socket_wsaprotocol_info_import' => ['resource|false', 'info_id'=>'string'],
'socket_wsaprotocol_info_release' => ['bool', 'info_id'=>'string'],
],
'changed' => [
'array_push' => [
'old' => ['int', '&rw_array'=>'array', '...values'=>'mixed'],
'new' => ['int', '&rw_array'=>'array', '...values='=>'mixed'],
],
'array_unshift' => [
'old' => ['int', '&rw_array'=>'array', '...values'=>'mixed'],
'new' => ['int', '&rw_array'=>'array', '...values='=>'mixed'],
],
'bcscale' => [
'old' => ['int', 'scale'=>'int'],
'new' => ['int', 'scale='=>'int'],
],
'ldap_compare' => [
'old' => ['bool|int', 'ldap'=>'resource', 'dn'=>'string', 'attribute'=>'string', 'value'=>'string'],
'new' => ['bool|int', 'ldap'=>'resource', 'dn'=>'string', 'attribute'=>'string', 'value'=>'string', 'controls='=>'array'],
],
'ldap_delete' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'controls='=>'array'],
],
'ldap_exop_passwd' => [
'old' => ['bool|string', 'ldap'=>'resource', 'user='=>'string', 'old_password='=>'string', 'new_password='=>'string'],
'new' => ['bool|string', 'ldap'=>'resource', 'user='=>'string', 'old_password='=>'string', 'new_password='=>'string', '&w_controls='=>'array'],
],
'ldap_list' => [
'old' => ['resource|false', 'ldap'=>'resource|array', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'],
'new' => ['resource|false', 'ldap'=>'resource|array', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'controls='=>'array'],
],
'ldap_mod_add' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'array'],
],
'ldap_mod_del' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'array'],
],
'ldap_mod_replace' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'array'],
],
'ldap_modify' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'array'],
],
'ldap_modify_batch' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'modifications_info'=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'modifications_info'=>'array', 'controls='=>'array'],
],
'ldap_read' => [
'old' => ['resource|false', 'ldap'=>'resource|array', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'],
'new' => ['resource|false', 'ldap'=>'resource|array', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'controls='=>'array'],
],
'ldap_rename' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'new_rdn'=>'string', 'new_parent'=>'string', 'delete_old_rdn'=>'bool'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'new_rdn'=>'string', 'new_parent'=>'string', 'delete_old_rdn'=>'bool', 'controls='=>'array'],
],
'ldap_search' => [
'old' => ['resource|false', 'ldap'=>'resource|resource[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'],
'new' => ['resource|false', 'ldap'=>'resource|resource[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'controls='=>'array'],
],
],
'removed' => [
],
];

View File

@@ -0,0 +1,91 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 7.4 to php 7.3 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 7.3
* The 'removed' section contains the signatures that were removed in php 7.4.
* The 'changed' section contains functions for which the signature has changed for php 7.4.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 7.3 and in PHP 7.4, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'ReflectionProperty::getType' => ['?ReflectionType'],
'mb_str_split' => ['list<string>|false', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'],
'openssl_x509_verify' => ['int', 'certificate'=>'string|resource', 'public_key'=>'string|array|resource'],
],
'changed' => [
'Locale::lookup' => [
'old' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'string'],
'new' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'?string'],
],
'SplFileObject::fwrite' => [
'old' => ['int', 'data'=>'string', 'length='=>'int'],
'new' => ['int|false', 'data'=>'string', 'length='=>'int'],
],
'SplTempFileObject::fwrite' => [
'old' => ['int', 'data'=>'string', 'length='=>'int'],
'new' => ['int|false', 'data'=>'string', 'length='=>'int'],
],
'array_merge' => [
'old' => ['array', '...arrays'=>'array'],
'new' => ['array', '...arrays='=>'array'],
],
'array_merge_recursive' => [
'old' => ['array', '...arrays'=>'array'],
'new' => ['array', '...arrays='=>'array'],
],
'gzread' => [
'old' => ['string|0', 'stream'=>'resource', 'length'=>'int'],
'new' => ['string|false', 'stream'=>'resource', 'length'=>'int'],
],
'locale_lookup' => [
'old' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'string'],
'new' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'?string'],
],
'openssl_random_pseudo_bytes' => [
'old' => ['string|false', 'length'=>'int', '&w_strong_result='=>'bool'],
'new' => ['string', 'length'=>'int', '&w_strong_result='=>'bool'],
],
'password_hash' => [
'old' => ['string|false', 'password'=>'string', 'algo'=>'int', 'options='=>'array'],
'new' => ['string|false', 'password'=>'string', 'algo'=>'int|string|null', 'options='=>'array'],
],
'password_needs_rehash' => [
'old' => ['bool', 'hash'=>'string', 'algo'=>'int', 'options='=>'array'],
'new' => ['bool', 'hash'=>'string', 'algo'=>'int|string|null', 'options='=>'array'],
],
'preg_replace_callback' => [
'old' => ['string|null', 'pattern'=>'string|array', 'callback'=>'callable(string[]):string', 'subject'=>'string', 'limit='=>'int', '&w_count='=>'int'],
'new' => ['string|null', 'pattern'=>'string|array', 'callback'=>'callable(string[]):string', 'subject'=>'string', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
],
'preg_replace_callback\'1' => [
'old' => ['string[]|null', 'pattern'=>'string|array', 'callback'=>'callable(string[]):string', 'subject'=>'string[]', 'limit='=>'int', '&w_count='=>'int'],
'new' => ['string[]|null', 'pattern'=>'string|array', 'callback'=>'callable(string[]):string', 'subject'=>'string[]', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
],
'preg_replace_callback_array' => [
'old' => ['string|null', 'pattern'=>'array<string,callable(array):string>', 'subject'=>'string', 'limit='=>'int', '&w_count='=>'int'],
'new' => ['string|null', 'pattern'=>'array<string,callable(array):string>', 'subject'=>'string', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
],
'preg_replace_callback_array\'1' => [
'old' => ['string[]|null', 'pattern'=>'array<string,callable(array):string>', 'subject'=>'string[]', 'limit='=>'int', '&w_count='=>'int'],
'new' => ['string[]|null', 'pattern'=>'array<string,callable(array):string>', 'subject'=>'string[]', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
],
'proc_open' => [
'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'],
],
'strip_tags' => [
'old' => ['string', 'string'=>'string', 'allowed_tags='=>'string'],
'new' => ['string', 'string'=>'string', 'allowed_tags='=>'string|list<non-empty-string>'],
],
],
'removed' => [
],
];

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 8.2 to php 8.1 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 8.1
* The 'removed' section contains the signatures that were removed in php 8.2
* The 'changed' section contains functions for which the signature has changed for php 8.2.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 8.1 and in PHP 8.2, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'mysqli_execute_query' => ['mysqli_result|bool', 'mysql'=>'mysqli', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'mysqli::execute_query' => ['mysqli_result|bool', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'openssl_cipher_key_length' => ['positive-int|false', 'cipher_algo'=>'non-empty-string'],
'curl_upkeep' => ['bool', 'handle'=>'CurlHandle'],
'imap_is_open' => ['bool', 'imap'=>'IMAP\Connection'],
'ini_parse_quantity' => ['int', 'shorthand'=>'non-empty-string'],
'libxml_get_external_entity_loader' => ['(callable(string,string,array{directory:?string,intSubName:?string,extSubURI:?string,extSubSystem:?string}):(resource|string|null))|null'],
'memory_reset_peak_usage' => ['void'],
'sodium_crypto_stream_xchacha20_xor_ic' => ['string', 'message'=>'string', 'nonce'=>'non-empty-string', 'counter'=>'int', 'key'=>'non-empty-string'],
'ZipArchive::clearError' => ['void'],
'ZipArchive::getStreamIndex' => ['resource|false', 'index'=>'int', 'flags='=>'int'],
'ZipArchive::getStreamName' => ['resource|false', 'name'=>'string', 'flags='=>'int'],
'DateTimeInterface::__serialize' => ['array'],
'DateTimeInterface::__unserialize' => ['void', 'data'=>'array'],
],
'changed' => [
'dba_open' => [
'old' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'new' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
],
'dba_popen' => [
'old' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'new' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
],
'str_split' => [
'old' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int'],
'new' => ['list<string>', 'string'=>'string', 'length='=>'positive-int'],
],
],
'removed' => [
],
];

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,63 @@
<?php
use Psalm\Type\TaintKind;
// This maps internal function names to sink types that we dont want to end up there
/**
* @var array<string, list<list<TaintKind::*>>>
*/
return [
'exec' => [['shell']],
'create_function' => [[], ['eval']],
'file_get_contents' => [['file']],
'file_put_contents' => [['file']],
'fopen' => [['file']],
'unlink' => [['file']],
'copy' => [['file'], ['file']],
'file' => [['file']],
'link' => [['file'], ['file']],
'mkdir' => [['file']],
'move_uploaded_file' => [['file'], ['file']],
'parse_ini_file' => [['file']],
'chown' => [['file']],
'lchown' => [['file']],
'readfile' => [['file']],
'rename' => [['file'], ['file']],
'rmdir' => [['file']],
'header' => [['header']],
'symlink' => [['file']],
'tempnam' => [['file']],
'igbinary_unserialize' => [['unserialize']],
'ldap_search' => [[], ['ldap'], ['ldap']],
'mysqli_query' => [[], ['sql']],
'mysqli::query' => [['sql']],
'mysqli_real_query' => [[], ['sql']],
'mysqli::real_query' => [['sql']],
'mysqli_multi_query' => [[], ['sql']],
'mysqli::multi_query' => [['sql']],
'mysqli_prepare' => [[], ['sql']],
'mysqli::prepare' => [['sql']],
'mysqli_stmt::__construct' => [[], ['sql']],
'mysqli_stmt_prepare' => [[], ['sql']],
'mysqli_stmt::prepare' => [['sql']],
'passthru' => [['shell']],
'pcntl_exec' => [['shell']],
'pg_exec' => [[], ['sql']],
'pg_prepare' => [[], [], ['sql']],
'pg_put_line' => [[], ['sql']],
'pg_query' => [[], ['sql']],
'pg_query_params' => [[], ['sql']],
'pg_send_prepare' => [[], [], ['sql']],
'pg_send_query' => [[], ['sql']],
'pg_send_query_params' => [[], ['sql'], []],
'setcookie' => [['cookie'], ['cookie']],
'shell_exec' => [['shell']],
'system' => [['shell']],
'unserialize' => [['unserialize']],
'popen' => [['shell']],
'proc_open' => [['shell']],
'curl_init' => [['ssrf']],
'curl_setopt' => [[], [], ['ssrf']],
'getimagesize' => [['ssrf']],
];

View File

@@ -0,0 +1,145 @@
<?php
namespace Psalm\Internal;
/**
* This file holds manually defined property maps, which are not added to the
* official PHP docs and therefore can not be automatically updated by
* bin/update-property-map.php.
*
* If you change this file, please run bin/update-property-map.php to keep
* PropertyMap.php in sync.
*/
return [
//
// Incorrectly documented classes from here on.
// Revise these against the current state of the docs from time to time.
//
'dateinterval' => [
// documented as 'mixed' in doc-en/reference/datetime/dateinterval.xml:90.
'days' => 'false|int',
],
'domnode' => [
// documented as 'DomNodeList' in doc-en/reference/dom/domnode.xml:57.
'childnodes' => 'DomNodeList<DomNode>'
],
'tidy' => [
// documented via <xi:include> in doc-en/reference/tidy/tidy.xml:33
'errorbuffer' => 'string',
],
//
// Undocumented classes from here on.
//
'phpparser\\node\\expr\\array_' => [
'items' => 'array<int, PhpParser\\Node\\Expr\\ArrayItem|null>',
],
'phpparser\\node\\expr\\arrowfunction' => [
'params' => 'list<PhpParser\\Node\\Param>',
],
'phpparser\\node\\expr\\closure' => [
'params' => 'list<PhpParser\\Node\\Param>',
],
'phpparser\\node\\expr\\list_' => [
'items' => 'array<int, PhpParser\\Node\\Expr\\ArrayItem|null>',
],
'phpparser\\node\\expr\\shellexec' => [
'parts' => 'list<PhpParser\\Node>',
],
'phpparser\\node\\matcharm' => [
'conds' => 'null|non-empty-list<PhpParser\\Node\\Expr>',
],
'phpparser\\node\\name' => [
'parts' => 'non-empty-list<non-empty-string>',
],
'phpparser\\node\\stmt\\case_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\catch_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\class_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\do_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\else_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\elseif_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\finally_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\for_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\foreach_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\if_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\interface_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\namespace_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\trait_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\trycatch' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\while_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'rdkafka\\message' => [
'err' => 'int',
'headers' => 'array<string, string>|null',
'key' => 'string|null',
'offset' => 'int',
'partition' => 'int',
'payload' => 'string',
'timestamp' => 'int',
'topic_name' => 'string',
],
//
// Legacy extensions that got removed.
//
'mongoclient' => [
'connected' => 'boolean',
'status' => 'string',
],
'mongocollection' => [
'db' => 'MongoDB',
'w' => 'integer',
'wtimeout' => 'integer',
],
'mongocursor' => [
'slaveokay' => 'boolean',
'timeout' => 'integer',
],
'mongodb' => [
'w' => 'integer',
'wtimeout' => 'integer',
],
'mongodb-driver-exception-writeexception' => [
'writeresult' => 'MongoDBDriverWriteResult',
],
'mongoid' => [
'id' => 'string',
],
'mongoint32' => [
'value' => 'string',
],
'mongoint64' => [
'value' => 'string',
],
'tokyotyrantexception' => [
'code' => 'int',
],
];

View File

@@ -0,0 +1,618 @@
<?php
namespace Psalm\Internal;
/**
* Automatically created by bin/update-property-map.php
*
* Please do not modify - adapt the override constants in above file instead.
*/
return [
'commonmark\\node' => [
'endColumn' => 'int',
'endLine' => 'int',
'firstChild' => 'Node|null',
'lastChild' => 'Node|null',
'next' => 'Node|null',
'parent' => 'Node|null',
'previous' => 'Node|null',
'startColumn' => 'int',
'startLine' => 'int',
],
'commonmark\\node\\bulletlist' => [
'delimiter' => 'int',
'tight' => 'bool',
],
'commonmark\\node\\codeblock' => [
'fence' => 'string|null',
],
'commonmark\\node\\customblock' => [
'onEnter' => 'string|null',
'onLeave' => 'string|null',
],
'commonmark\\node\\custominline' => [
'onEnter' => 'string|null',
'onLeave' => 'string|null',
],
'commonmark\\node\\heading' => [
'level' => 'int',
],
'commonmark\\node\\image' => [
'title' => 'string|null',
'url' => 'string|null',
],
'commonmark\\node\\link' => [
'title' => 'string|null',
'url' => 'string|null',
],
'commonmark\\node\\orderedlist' => [
'delimiter' => 'int',
'start' => 'int',
'tight' => 'bool',
],
'commonmark\\node\\text' => [
'literal' => 'string|null',
],
'curlfile' => [
'mime' => 'string',
'name' => 'string',
'postname' => 'string',
],
'curlstringfile' => [
'data' => 'string',
'mime' => 'string',
'postname' => 'string',
],
'dateinterval' => [
'd' => 'int',
'date_string' => 'string',
'days' => 'false|int',
'f' => 'float',
'from_string' => 'bool',
'h' => 'int',
'i' => 'int',
'invert' => 'int',
'm' => 'int',
's' => 'int',
'y' => 'int',
],
'dateperiod' => [
'current' => 'DateTimeInterface',
'end' => 'DateTimeInterface',
'include_start_date' => 'bool',
'interval' => 'DateInterval',
'recurrences' => 'int',
'start' => 'DateTimeInterface',
],
'directory' => [
'handle' => 'resource',
'path' => 'string',
],
'domattr' => [
'name' => 'string',
'ownerElement' => 'DOMElement|null',
'schemaTypeInfo' => 'mixed',
'specified' => 'bool',
'value' => 'string',
],
'domcharacterdata' => [
'data' => 'string',
'length' => 'int',
'nextElementSibling' => 'DOMElement|null',
'previousElementSibling' => 'DOMElement|null',
],
'domdocument' => [
'actualEncoding' => 'string|null',
'childElementCount' => 'int',
'config' => 'mixed',
'doctype' => 'DOMDocumentType|null',
'documentElement' => 'DOMElement|null',
'documentURI' => 'string|null',
'encoding' => 'string|null',
'firstElementChild' => 'DOMElement|null',
'formatOutput' => 'bool',
'implementation' => 'DOMImplementation',
'lastElementChild' => 'DOMElement|null',
'preserveWhiteSpace' => 'bool',
'recover' => 'bool',
'resolveExternals' => 'bool',
'standalone' => 'bool',
'strictErrorChecking' => 'bool',
'substituteEntities' => 'bool',
'validateOnParse' => 'bool',
'version' => 'string|null',
'xmlEncoding' => 'string|null',
'xmlStandalone' => 'bool',
'xmlVersion' => 'string|null',
],
'domdocumentfragment' => [
'childElementCount' => 'int',
'firstelementChild' => 'DOMElement|null',
'lastelementChild' => 'DOMElement|null',
],
'domdocumenttype' => [
'entities' => 'DOMNamedNodeMap',
'internalsubset' => 'string|null',
'name' => 'string',
'notations' => 'DOMNamedNodeMap',
'publicid' => 'string',
'systemid' => 'string',
],
'domelement' => [
'childElementCount' => 'int',
'firstElementChild' => 'DOMElement|null',
'lastElementChild' => 'DOMElement|null',
'nextElementSibling' => 'DOMElement|null',
'previousElementSibling' => 'DOMElement|null',
'schemaTypeInfo' => 'mixed',
'tagName' => 'string',
],
'domentity' => [
'actualEncoding' => 'string|null',
'encoding' => 'string|null',
'notationName' => 'string|null',
'publicid' => 'string|null',
'systemid' => 'string|null',
'version' => 'string|null',
],
'domexception' => [
'code' => 'int',
],
'domnamednodemap' => [
'length' => 'int',
],
'domnode' => [
'attributes' => 'DOMNamedNodeMap|null',
'baseURI' => 'string|null',
'childNodes' => 'DOMNodeList<DOMNode>',
'firstChild' => 'DOMNode|null',
'lastChild' => 'DOMNode|null',
'localName' => 'string|null',
'namespaceURI' => 'string|null',
'nextSibling' => 'DOMNode|null',
'nodeName' => 'string',
'nodeType' => 'int',
'nodeValue' => 'string|null',
'ownerDocument' => 'DOMDocument|null',
'parentNode' => 'DOMNode|null',
'prefix' => 'string',
'previousSibling' => 'DOMNode|null',
'textContent' => 'string',
],
'domnodelist' => [
'length' => 'int',
],
'domnotation' => [
'publicId' => 'string',
'systemId' => 'string',
],
'domprocessinginstruction' => [
'data' => 'string',
'target' => 'string',
],
'domtext' => [
'wholeText' => 'string',
],
'domxpath' => [
'document' => 'DOMDocument',
'registerNodeNamespaces' => 'bool',
],
'errorexception' => [
'severity' => 'int',
],
'event' => [
'pending' => 'bool',
],
'eventbuffer' => [
'contiguous_space' => 'int',
'length' => 'int',
],
'eventbufferevent' => [
'fd' => 'int',
'input' => 'EventBuffer',
'output' => 'EventBuffer',
'priority' => 'int',
],
'eventlistener' => [
'fd' => 'int',
],
'eventsslcontext' => [
'local_cert' => 'string',
'local_pk' => 'string',
],
'libxmlerror' => [
'code' => 'int',
'column' => 'int',
'file' => 'string',
'level' => 'int',
'line' => 'int',
'message' => 'string',
],
'mongoclient' => [
'connected' => 'boolean',
'status' => 'string',
],
'mongocollection' => [
'db' => 'MongoDB',
'w' => 'integer',
'wtimeout' => 'integer',
],
'mongocursor' => [
'slaveokay' => 'boolean',
'timeout' => 'integer',
],
'mongodb' => [
'w' => 'integer',
'wtimeout' => 'integer',
],
'mongodb\\driver\\exception\\commandexception' => [
'resultdocument' => 'object',
],
'mongodb\\driver\\exception\\runtimeexception' => [
'errorlabels' => 'array|null',
],
'mongodb\\driver\\exception\\writeexception' => [
'writeresult' => 'MongoDB\\Driver\\WriteResult',
],
'mongoid' => [
'id' => 'string',
],
'mongoint32' => [
'value' => 'string',
],
'mongoint64' => [
'value' => 'string',
],
'mysqli' => [
'affected_rows' => 'int<-1, max>|numeric-string',
'client_info' => 'string',
'client_version' => 'int',
'connect_errno' => 'int',
'connect_error' => 'string|null',
'errno' => 'int',
'error' => 'string',
'error_list' => 'array',
'field_count' => 'int',
'host_info' => 'string',
'info' => 'string|null',
'insert_id' => 'int|string',
'protocol_version' => 'int',
'server_info' => 'string',
'server_version' => 'int',
'sqlstate' => 'string',
'thread_id' => 'int',
'warning_count' => 'int',
],
'mysqli_driver' => [
'client_info' => 'string',
'client_version' => 'int',
'driver_version' => 'int',
'embedded' => 'bool',
'reconnect' => 'bool',
'report_mode' => 'int',
],
'mysqli_result' => [
'current_field' => 'int',
'field_count' => 'int',
'lengths' => 'array|null',
'num_rows' => 'int<0, max>|numeric-string',
'type' => 'int',
],
'mysqli_sql_exception' => [
'sqlstate' => 'string',
],
'mysqli_stmt' => [
'affected_rows' => 'int<-1, max>|numeric-string',
'errno' => 'int',
'error' => 'string',
'error_list' => 'array',
'field_count' => 'int',
'id' => 'int',
'insert_id' => 'int|string',
'num_rows' => 'int<0, max>|numeric-string',
'param_count' => 'int',
'sqlstate' => 'string',
],
'mysqli_warning' => [
'errno' => 'int',
'message' => 'string',
'sqlstate' => 'string',
],
'parallel\\events\\event' => [
'object' => 'object',
'source' => 'string',
'type' => 'int',
],
'parle\\errorinfo' => [
'id' => 'int',
'position' => 'int',
'token' => 'mixed',
],
'parle\\lexer' => [
'bol' => 'bool',
'cursor' => 'int',
'flags' => 'int',
'marker' => 'int',
'state' => 'int',
],
'parle\\parser' => [
'action' => 'int',
'reduceid' => 'int',
],
'parle\\rlexer' => [
'bol' => 'bool',
'cursor' => 'int',
'flags' => 'int',
'marker' => 'int',
'state' => 'int',
],
'parle\\rparser' => [
'action' => 'int',
'reduceid' => 'int',
],
'parle\\stack' => [
'empty' => 'bool',
'size' => 'int',
'top' => 'mixed',
],
'parle\\token' => [
'id' => 'int',
'value' => 'string',
],
'pdoexception' => [
'code' => 'int|string',
'errorInfo' => 'array|null',
],
'pdostatement' => [
'queryString' => 'string',
],
'php_user_filter' => [
'filtername' => 'string',
'params' => 'mixed',
'stream' => 'resource|null',
],
'phpparser\\node\\expr\\array_' => [
'items' => 'array<int, PhpParser\\Node\\Expr\\ArrayItem|null>',
],
'phpparser\\node\\expr\\arrowfunction' => [
'params' => 'list<PhpParser\\Node\\Param>',
],
'phpparser\\node\\expr\\closure' => [
'params' => 'list<PhpParser\\Node\\Param>',
],
'phpparser\\node\\expr\\list_' => [
'items' => 'array<int, PhpParser\\Node\\Expr\\ArrayItem|null>',
],
'phpparser\\node\\expr\\shellexec' => [
'parts' => 'list<PhpParser\\Node>',
],
'phpparser\\node\\matcharm' => [
'conds' => 'null|non-empty-list<PhpParser\\Node\\Expr>',
],
'phpparser\\node\\name' => [
'parts' => 'non-empty-list<non-empty-string>',
],
'phpparser\\node\\stmt\\case_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\catch_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\class_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\do_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\else_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\elseif_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\finally_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\for_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\foreach_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\if_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\interface_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\namespace_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\trait_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\trycatch' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phpparser\\node\\stmt\\while_' => [
'stmts' => 'list<PhpParser\\Node\\Stmt>',
],
'phptoken' => [
'id' => 'int',
'line' => 'int',
'pos' => 'int',
'text' => 'string',
],
'rdkafka\\message' => [
'err' => 'int',
'headers' => 'array<string, string>|null',
'key' => 'string|null',
'offset' => 'int',
'partition' => 'int',
'payload' => 'string',
'timestamp' => 'int',
'topic_name' => 'string',
],
'reflectionextension' => [
'name' => 'string',
],
'reflectionfunctionabstract' => [
'name' => 'string',
],
'reflectionzendextension' => [
'name' => 'string',
],
'snmp' => [
'enum_print' => 'bool',
'exceptions_enabled' => 'int',
'info' => 'array',
'max_oids' => 'int|null',
'oid_increasing_check' => 'bool',
'oid_output_format' => 'int',
'quick_print' => 'bool',
'valueretrieval' => 'int',
],
'snmpexception' => [
'code' => 'string',
],
'soapclient' => [
'__default_headers' => 'array|null',
'__last_request' => 'string|null',
'__last_request_headers' => 'string|null',
'__last_response' => 'string|null',
'__last_response_headers' => 'string|null',
'__soap_fault' => 'SoapFault|null',
'_classmap' => 'array|null',
'_connection_timeout' => 'int',
'_cookies' => 'array',
'_digest' => 'string|null',
'_encoding' => 'string|null',
'_exceptions' => 'bool',
'_features' => 'int|null',
'_keep_alive' => 'bool',
'_login' => 'string|null',
'_password' => 'string|null',
'_proxy_host' => 'string|null',
'_proxy_login' => 'string|null',
'_proxy_password' => 'string|null',
'_proxy_port' => 'int|null',
'_soap_version' => 'int',
'_ssl_method' => 'int|null',
'_stream_context' => 'resource|null',
'_use_digest' => 'bool',
'_use_proxy' => 'int|null',
'_user_agent' => 'string|null',
'compression' => 'int|null',
'httpsocket' => 'resource|null',
'httpurl' => 'resource|null',
'location' => 'string|null',
'sdl' => 'resource|null',
'style' => 'int|null',
'trace' => 'bool',
'typemap' => 'resource|null',
'uri' => 'string|null',
'use' => 'int|null',
],
'soapfault' => [
'_name' => 'string|null',
'detail' => 'mixed',
'faultactor' => 'string|null',
'faultcode' => 'string|null',
'faultcodens' => 'string|null',
'faultstring' => 'string',
'headerfault' => 'mixed',
],
'soapheader' => [
'actor' => 'string|int|null',
'data' => 'mixed',
'mustUnderstand' => 'bool',
'name' => 'string',
'namespace' => 'string',
],
'soapparam' => [
'param_data' => 'mixed',
'param_name' => 'string',
],
'soapserver' => [
'__soap_fault' => 'SoapFault|null',
'service' => 'resource',
],
'soapvar' => [
'enc_name' => 'string|null',
'enc_namens' => 'string|null',
'enc_ns' => 'string|null',
'enc_stype' => 'string|null',
'enc_type' => 'int',
'enc_value' => 'mixed',
],
'solrdocumentfield' => [
'boost' => 'float',
'name' => 'string',
'values' => 'array',
],
'solrexception' => [
'sourcefile' => 'string',
'sourceline' => 'int',
'zif_name' => 'string',
],
'solrresponse' => [
'http_digested_response' => 'string',
'http_raw_request' => 'string',
'http_raw_request_headers' => 'string',
'http_raw_response' => 'string',
'http_raw_response_headers' => 'string',
'http_request_url' => 'string',
'http_status' => 'int',
'http_status_message' => 'string',
'parser_mode' => 'int',
'success' => 'bool',
],
'streamwrapper' => [
'context' => 'resource',
],
'tidy' => [
'errorBuffer' => 'string',
'value' => 'string|null',
],
'tidynode' => [
'attribute' => 'array|null',
'child' => 'array|null',
'column' => 'int',
'id' => 'int|null',
'line' => 'int',
'name' => 'string',
'proprietary' => 'bool',
'type' => 'int',
'value' => 'string',
],
'tokyotyrantexception' => [
'code' => 'int',
],
'transliterator' => [
'id' => 'string',
],
'xmlreader' => [
'attributeCount' => 'int',
'baseURI' => 'string',
'depth' => 'int',
'hasAttributes' => 'bool',
'hasValue' => 'bool',
'isDefault' => 'bool',
'isEmptyElement' => 'bool',
'localName' => 'string',
'name' => 'string',
'namespaceURI' => 'string',
'nodeType' => 'int',
'prefix' => 'string',
'value' => 'string',
'xmlLang' => 'string',
],
'ziparchive' => [
'comment' => 'string',
'filename' => 'string',
'lastId' => 'int',
'numFiles' => 'int',
'status' => 'int',
'statusSys' => 'int',
],
];