[phpstorm-stubs] update for PHP 8.3
This commit is contained in:
parent
ef2dad0e42
commit
24c80bebff
|
@ -8,7 +8,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
|
||||
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
name: Run tests against php ${{matrix.php}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -50,4 +50,4 @@ jobs:
|
|||
run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite Structure
|
||||
|
||||
- name: run cs fixer
|
||||
run: docker-compose -f docker-compose.yml run test_runner composer cs
|
||||
run: docker-compose -f docker-compose.yml run -e PHP_CS_FIXER_IGNORE_ENV=true test_runner composer cs
|
||||
|
|
|
@ -166,6 +166,16 @@ function str_ends_with(string $haystack, string $needle): bool {}
|
|||
#[Pure]
|
||||
function str_contains(string $haystack, string $needle): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function str_decrement(string $string): string {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function str_increment(string $string): string {}
|
||||
|
||||
/**
|
||||
* Return the current key and value pair from an array and advance the array cursor
|
||||
* @link https://php.net/manual/en/function.each.php
|
||||
|
|
|
@ -418,8 +418,17 @@ const CLASSES = array (
|
|||
'DOMUserDataHandler' => 'dom/dom_c.php',
|
||||
'DOMXPath' => 'dom/dom_c.php',
|
||||
'DOTNET' => 'com_dotnet/com_dotnet.php',
|
||||
'DateError' => 'date/date_c.php',
|
||||
'DateException' => 'date/date_c.php',
|
||||
'DateInterval' => 'date/date_c.php',
|
||||
'DateInvalidOperationException' => 'date/date_c.php',
|
||||
'DateInvalidTimeZoneException' => 'date/date_c.php',
|
||||
'DateMalformedIntervalStringException' => 'date/date_c.php',
|
||||
'DateMalformedPeriodStringException' => 'date/date_c.php',
|
||||
'DateMalformedStringException' => 'date/date_c.php',
|
||||
'DateObjectError' => 'date/date_c.php',
|
||||
'DatePeriod' => 'date/date_c.php',
|
||||
'DateRangeError' => 'date/date_c.php',
|
||||
'DateTime' => 'date/date_c.php',
|
||||
'DateTimeImmutable' => 'date/date_c.php',
|
||||
'DateTimeInterface' => 'date/date_c.php',
|
||||
|
@ -789,6 +798,7 @@ const CLASSES = array (
|
|||
'Random\\Engine\\PcgOneseq128XslRr64' => 'random/random.php',
|
||||
'Random\\Engine\\Secure' => 'random/random.php',
|
||||
'Random\\Engine\\Xoshiro256StarStar' => 'random/random.php',
|
||||
'Random\\IntervalBoundary' => 'random/random.php',
|
||||
'Random\\RandomError' => 'random/random.php',
|
||||
'Random\\RandomException' => 'random/random.php',
|
||||
'Random\\Randomizer' => 'random/random.php',
|
||||
|
@ -868,6 +878,7 @@ const CLASSES = array (
|
|||
'SNMP' => 'snmp/snmp.php',
|
||||
'SNMPException' => 'snmp/snmp.php',
|
||||
'SQLite3' => 'sqlite3/sqlite3.php',
|
||||
'SQLite3Exception' => 'sqlite3/sqlite3.php',
|
||||
'SQLite3Result' => 'sqlite3/sqlite3.php',
|
||||
'SQLite3Stmt' => 'sqlite3/sqlite3.php',
|
||||
'SQLiteDatabase' => 'SQLite/SQLite.php',
|
||||
|
@ -3352,6 +3363,7 @@ const FUNCTIONS = array (
|
|||
'json_encode' => 'json/json.php',
|
||||
'json_last_error' => 'json/json.php',
|
||||
'json_last_error_msg' => 'json/json.php',
|
||||
'json_validate' => 'json/json.php',
|
||||
'juliantojd' => 'calendar/calendar.php',
|
||||
'kafka_err2name' => 'simple_kafka_client/functions.php',
|
||||
'kafka_err2str' => 'simple_kafka_client/functions.php',
|
||||
|
@ -3388,6 +3400,7 @@ const FUNCTIONS = array (
|
|||
'ldap_exop' => 'ldap/ldap.php',
|
||||
'ldap_exop_passwd' => 'ldap/ldap.php',
|
||||
'ldap_exop_refresh' => 'ldap/ldap.php',
|
||||
'ldap_exop_sync' => 'ldap/ldap.php',
|
||||
'ldap_exop_whoami' => 'ldap/ldap.php',
|
||||
'ldap_explode_dn' => 'ldap/ldap.php',
|
||||
'ldap_first_attribute' => 'ldap/ldap.php',
|
||||
|
@ -3713,6 +3726,7 @@ const FUNCTIONS = array (
|
|||
'mb_scrub' => 'mbstring/mbstring.php',
|
||||
'mb_send_mail' => 'mbstring/mbstring.php',
|
||||
'mb_split' => 'mbstring/mbstring.php',
|
||||
'mb_str_pad' => 'mbstring/mbstring.php',
|
||||
'mb_str_split' => 'mbstring/mbstring.php',
|
||||
'mb_strcut' => 'mbstring/mbstring.php',
|
||||
'mb_strimwidth' => 'mbstring/mbstring.php',
|
||||
|
@ -4635,6 +4649,7 @@ const FUNCTIONS = array (
|
|||
'pg_dbname' => 'pgsql/pgsql.php',
|
||||
'pg_delete' => 'pgsql/pgsql.php',
|
||||
'pg_end_copy' => 'pgsql/pgsql.php',
|
||||
'pg_enter_pipeline_mode' => 'pgsql/pgsql.php',
|
||||
'pg_errormessage' => 'pgsql/pgsql.php',
|
||||
'pg_escape_bytea' => 'pgsql/pgsql.php',
|
||||
'pg_escape_identifier' => 'pgsql/pgsql.php',
|
||||
|
@ -4642,6 +4657,7 @@ const FUNCTIONS = array (
|
|||
'pg_escape_string' => 'pgsql/pgsql.php',
|
||||
'pg_exec' => 'pgsql/pgsql.php',
|
||||
'pg_execute' => 'pgsql/pgsql.php',
|
||||
'pg_exit_pipeline_mode' => 'pgsql/pgsql.php',
|
||||
'pg_fetch_all' => 'pgsql/pgsql.php',
|
||||
'pg_fetch_all_columns' => 'pgsql/pgsql.php',
|
||||
'pg_fetch_array' => 'pgsql/pgsql.php',
|
||||
|
@ -4705,6 +4721,8 @@ const FUNCTIONS = array (
|
|||
'pg_parameter_status' => 'pgsql/pgsql.php',
|
||||
'pg_pconnect' => 'pgsql/pgsql.php',
|
||||
'pg_ping' => 'pgsql/pgsql.php',
|
||||
'pg_pipeline_status' => 'pgsql/pgsql.php',
|
||||
'pg_pipeline_sync' => 'pgsql/pgsql.php',
|
||||
'pg_port' => 'pgsql/pgsql.php',
|
||||
'pg_prepare' => 'pgsql/pgsql.php',
|
||||
'pg_put_line' => 'pgsql/pgsql.php',
|
||||
|
@ -4721,6 +4739,7 @@ const FUNCTIONS = array (
|
|||
'pg_send_query' => 'pgsql/pgsql.php',
|
||||
'pg_send_query_params' => 'pgsql/pgsql.php',
|
||||
'pg_set_client_encoding' => 'pgsql/pgsql.php',
|
||||
'pg_set_error_context_visibility' => 'pgsql/pgsql.php',
|
||||
'pg_set_error_verbosity' => 'pgsql/pgsql.php',
|
||||
'pg_setclientencoding' => 'pgsql/pgsql.php',
|
||||
'pg_socket' => 'pgsql/pgsql.php',
|
||||
|
@ -4759,6 +4778,7 @@ const FUNCTIONS = array (
|
|||
'pos' => 'standard/standard_9.php',
|
||||
'posix_access' => 'posix/posix.php',
|
||||
'posix_ctermid' => 'posix/posix.php',
|
||||
'posix_eaccess' => 'posix/posix.php',
|
||||
'posix_errno' => 'posix/posix.php',
|
||||
'posix_get_last_error' => 'posix/posix.php',
|
||||
'posix_getcwd' => 'posix/posix.php',
|
||||
|
@ -4791,6 +4811,7 @@ const FUNCTIONS = array (
|
|||
'posix_setsid' => 'posix/posix.php',
|
||||
'posix_setuid' => 'posix/posix.php',
|
||||
'posix_strerror' => 'posix/posix.php',
|
||||
'posix_sysconf' => 'posix/posix.php',
|
||||
'posix_times' => 'posix/posix.php',
|
||||
'posix_ttyname' => 'posix/posix.php',
|
||||
'posix_uname' => 'posix/posix.php',
|
||||
|
@ -5028,6 +5049,7 @@ const FUNCTIONS = array (
|
|||
'socket_addrinfo_connect' => 'sockets/sockets.php',
|
||||
'socket_addrinfo_explain' => 'sockets/sockets.php',
|
||||
'socket_addrinfo_lookup' => 'sockets/sockets.php',
|
||||
'socket_atmark' => 'sockets/sockets.php',
|
||||
'socket_bind' => 'sockets/sockets.php',
|
||||
'socket_clear_error' => 'sockets/sockets.php',
|
||||
'socket_close' => 'sockets/sockets.php',
|
||||
|
@ -5379,8 +5401,10 @@ const FUNCTIONS = array (
|
|||
'stomp_unsubscribe' => 'stomp/stomp.php',
|
||||
'stomp_version' => 'stomp/stomp.php',
|
||||
'str_contains' => 'Core/Core.php',
|
||||
'str_decrement' => 'Core/Core.php',
|
||||
'str_ends_with' => 'Core/Core.php',
|
||||
'str_getcsv' => 'standard/standard_2.php',
|
||||
'str_increment' => 'Core/Core.php',
|
||||
'str_ireplace' => 'standard/standard_1.php',
|
||||
'str_pad' => 'standard/standard_2.php',
|
||||
'str_repeat' => 'standard/standard_1.php',
|
||||
|
@ -5405,6 +5429,7 @@ const FUNCTIONS = array (
|
|||
'stream_context_get_params' => 'standard/standard_6.php',
|
||||
'stream_context_set_default' => 'standard/standard_6.php',
|
||||
'stream_context_set_option' => 'standard/standard_6.php',
|
||||
'stream_context_set_options' => 'standard/standard_6.php',
|
||||
'stream_context_set_params' => 'standard/standard_6.php',
|
||||
'stream_copy_to_stream' => 'standard/standard_6.php',
|
||||
'stream_filter_append' => 'standard/standard_6.php',
|
||||
|
@ -6586,6 +6611,8 @@ const CONSTANTS = array (
|
|||
'CURLHSTS_READONLYFILE' => 'curl/curl_d.php',
|
||||
'CURLINFO_APPCONNECT_TIME' => 'curl/curl_d.php',
|
||||
'CURLINFO_APPCONNECT_TIME_T' => 'curl/curl_d.php',
|
||||
'CURLINFO_CAINFO' => 'curl/curl_d.php',
|
||||
'CURLINFO_CAPATH' => 'curl/curl_d.php',
|
||||
'CURLINFO_CERTINFO' => 'curl/curl_d.php',
|
||||
'CURLINFO_CONDITION_UNMET' => 'curl/curl_d.php',
|
||||
'CURLINFO_CONNECT_TIME' => 'curl/curl_d.php',
|
||||
|
@ -6650,6 +6677,11 @@ const CONSTANTS = array (
|
|||
'CURLINFO_STARTTRANSFER_TIME_T' => 'curl/curl_d.php',
|
||||
'CURLINFO_TOTAL_TIME' => 'curl/curl_d.php',
|
||||
'CURLINFO_TOTAL_TIME_T' => 'curl/curl_d.php',
|
||||
'CURLKHMATCH_LAST' => 'curl/curl_d.php',
|
||||
'CURLKHMATCH_MISMATCH' => 'curl/curl_d.php',
|
||||
'CURLKHMATCH_MISSING' => 'curl/curl_d.php',
|
||||
'CURLKHMATCH_OK' => 'curl/curl_d.php',
|
||||
'CURLMIMEOPT_FORMESCAPE' => 'curl/curl_d.php',
|
||||
'CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php',
|
||||
'CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php',
|
||||
'CURLMOPT_MAXCONNECTS' => 'curl/curl_d.php',
|
||||
|
@ -6681,6 +6713,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_CAINFO' => 'curl/curl_d.php',
|
||||
'CURLOPT_CAINFO_BLOB' => 'curl/curl_d.php',
|
||||
'CURLOPT_CAPATH' => 'curl/curl_d.php',
|
||||
'CURLOPT_CA_CACHE_TIMEOUT' => 'curl/curl_d.php',
|
||||
'CURLOPT_CERTINFO' => 'curl/curl_d.php',
|
||||
'CURLOPT_CLOSEPOLICY' => 'curl/curl_d.php',
|
||||
'CURLOPT_CONNECTTIMEOUT' => 'curl/curl_d.php',
|
||||
|
@ -6780,6 +6813,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_MAXREDIRS' => 'curl/curl_d.php',
|
||||
'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.php',
|
||||
'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.php',
|
||||
'CURLOPT_MIME_OPTIONS' => 'curl/curl_d.php',
|
||||
'CURLOPT_MUTE' => 'curl/curl_d.php',
|
||||
'CURLOPT_NETRC' => 'curl/curl_d.php',
|
||||
'CURLOPT_NETRC_FILE' => 'curl/curl_d.php',
|
||||
|
@ -6804,6 +6838,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_PRIVATE' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROGRESSFUNCTION' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROTOCOLS' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROTOCOLS_STR' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROXY' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROXYAUTH' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROXYHEADER' => 'curl/curl_d.php',
|
||||
|
@ -6838,12 +6873,14 @@ const CONSTANTS = array (
|
|||
'CURLOPT_PROXY_TLSAUTH_USERNAME' => 'curl/curl_d.php',
|
||||
'CURLOPT_PROXY_TRANSFER_MODE' => 'curl/curl_d.php',
|
||||
'CURLOPT_PUT' => 'curl/curl_d.php',
|
||||
'CURLOPT_QUICK_EXIT' => 'curl/curl_d.php',
|
||||
'CURLOPT_QUOTE' => 'curl/curl_d.php',
|
||||
'CURLOPT_RANDOM_FILE' => 'curl/curl_d.php',
|
||||
'CURLOPT_RANGE' => 'curl/curl_d.php',
|
||||
'CURLOPT_READDATA' => 'curl/curl_d.php',
|
||||
'CURLOPT_READFUNCTION' => 'curl/curl_d.php',
|
||||
'CURLOPT_REDIR_PROTOCOLS' => 'curl/curl_d.php',
|
||||
'CURLOPT_REDIR_PROTOCOLS_STR' => 'curl/curl_d.php',
|
||||
'CURLOPT_REFERER' => 'curl/curl_d.php',
|
||||
'CURLOPT_REQUEST_TARGET' => 'curl/curl_d.php',
|
||||
'CURLOPT_RESOLVE' => 'curl/curl_d.php',
|
||||
|
@ -6865,6 +6902,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_SOCKS5_GSSAPI_SERVICE' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_AUTH_TYPES' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_COMPRESSION' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_HOSTKEYFUNCTION' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256' => 'curl/curl_d.php',
|
||||
'CURLOPT_SSH_KNOWNHOSTS' => 'curl/curl_d.php',
|
||||
|
@ -6927,6 +6965,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_WILDCARDMATCH' => 'curl/curl_d.php',
|
||||
'CURLOPT_WRITEFUNCTION' => 'curl/curl_d.php',
|
||||
'CURLOPT_WRITEHEADER' => 'curl/curl_d.php',
|
||||
'CURLOPT_WS_OPTIONS' => 'curl/curl_d.php',
|
||||
'CURLOPT_XFERINFOFUNCTION' => 'curl/curl_d.php',
|
||||
'CURLOPT_XOAUTH2_BEARER' => 'curl/curl_d.php',
|
||||
'CURLPAUSE_ALL' => 'curl/curl_d.php',
|
||||
|
@ -7032,6 +7071,7 @@ const CONSTANTS = array (
|
|||
'CURLUSESSL_NONE' => 'curl/curl_d.php',
|
||||
'CURLUSESSL_TRY' => 'curl/curl_d.php',
|
||||
'CURLVERSION_NOW' => 'curl/curl_d.php',
|
||||
'CURLWS_RAW_MODE' => 'curl/curl_d.php',
|
||||
'CURL_FNMATCHFUNC_FAIL' => 'curl/curl_d.php',
|
||||
'CURL_FNMATCHFUNC_MATCH' => 'curl/curl_d.php',
|
||||
'CURL_FNMATCHFUNC_NOMATCH' => 'curl/curl_d.php',
|
||||
|
@ -8218,9 +8258,17 @@ const CONSTANTS = array (
|
|||
'IPV6_TCLASS' => 'sockets/sockets.php',
|
||||
'IPV6_UNICAST_HOPS' => 'sockets/sockets.php',
|
||||
'IPV6_V6ONLY' => 'sockets/sockets.php',
|
||||
'IP_BIND_ADDRESS_NO_PORT' => 'sockets/sockets.php',
|
||||
'IP_MTU_DISCOVER' => 'sockets/sockets.php',
|
||||
'IP_MULTICAST_IF' => 'sockets/sockets.php',
|
||||
'IP_MULTICAST_LOOP' => 'sockets/sockets.php',
|
||||
'IP_MULTICAST_TTL' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_DO' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_DONT' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_INTERFACE' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_OMIT' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_PROBE' => 'sockets/sockets.php',
|
||||
'IP_PMTUDISC_WANT' => 'sockets/sockets.php',
|
||||
'ImageButton' => 'winbinder/winbinder.php',
|
||||
'InvisibleArea' => 'winbinder/winbinder.php',
|
||||
'JOB_QUEUE_PRIORITY_HIGH' => 'zend/zend_d.php',
|
||||
|
@ -10512,6 +10560,7 @@ const CONSTANTS = array (
|
|||
'OPENSSL_CMS_NOINTERN' => 'openssl/openssl.php',
|
||||
'OPENSSL_CMS_NOSIGS' => 'openssl/openssl.php',
|
||||
'OPENSSL_CMS_NOVERIFY' => 'openssl/openssl.php',
|
||||
'OPENSSL_CMS_OLDMIMETYPE' => 'openssl/openssl.php',
|
||||
'OPENSSL_CMS_TEXT' => 'openssl/openssl.php',
|
||||
'OPENSSL_DEFAULT_STREAM_CIPHERS' => 'openssl/openssl.php',
|
||||
'OPENSSL_DONT_ZERO_PAD_KEY' => 'openssl/openssl.php',
|
||||
|
@ -10639,6 +10688,7 @@ const CONSTANTS = array (
|
|||
'PGSQL_DML_STRING' => 'pgsql/pgsql.php',
|
||||
'PGSQL_EMPTY_QUERY' => 'pgsql/pgsql.php',
|
||||
'PGSQL_ERRORS_DEFAULT' => 'pgsql/pgsql.php',
|
||||
'PGSQL_ERRORS_SQLSTATE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_ERRORS_TERSE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_ERRORS_VERBOSE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_FATAL_ERROR' => 'pgsql/pgsql.php',
|
||||
|
@ -10649,6 +10699,10 @@ const CONSTANTS = array (
|
|||
'PGSQL_NOTICE_CLEAR' => 'pgsql/pgsql.php',
|
||||
'PGSQL_NOTICE_LAST' => 'pgsql/pgsql.php',
|
||||
'PGSQL_NUM' => 'pgsql/pgsql.php',
|
||||
'PGSQL_PIPELINE_ABORTED' => 'pgsql/pgsql.php',
|
||||
'PGSQL_PIPELINE_OFF' => 'pgsql/pgsql.php',
|
||||
'PGSQL_PIPELINE_ON' => 'pgsql/pgsql.php',
|
||||
'PGSQL_PIPELINE_SYNC' => 'pgsql/pgsql.php',
|
||||
'PGSQL_POLLING_ACTIVE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_POLLING_FAILED' => 'pgsql/pgsql.php',
|
||||
'PGSQL_POLLING_OK' => 'pgsql/pgsql.php',
|
||||
|
@ -10657,8 +10711,12 @@ const CONSTANTS = array (
|
|||
'PGSQL_SEEK_CUR' => 'pgsql/pgsql.php',
|
||||
'PGSQL_SEEK_END' => 'pgsql/pgsql.php',
|
||||
'PGSQL_SEEK_SET' => 'pgsql/pgsql.php',
|
||||
'PGSQL_SHOW_CONTEXT_ALWAYS' => 'pgsql/pgsql.php',
|
||||
'PGSQL_SHOW_CONTEXT_ERRORS' => 'pgsql/pgsql.php',
|
||||
'PGSQL_SHOW_CONTEXT_NEVER' => 'pgsql/pgsql.php',
|
||||
'PGSQL_STATUS_LONG' => 'pgsql/pgsql.php',
|
||||
'PGSQL_STATUS_STRING' => 'pgsql/pgsql.php',
|
||||
'PGSQL_TRACE_REGRESS_MODE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_TRANSACTION_ACTIVE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_TRANSACTION_IDLE' => 'pgsql/pgsql.php',
|
||||
'PGSQL_TRANSACTION_INERROR' => 'pgsql/pgsql.php',
|
||||
|
@ -10752,6 +10810,7 @@ const CONSTANTS = array (
|
|||
'PKCS7_NOCERTS' => 'openssl/openssl.php',
|
||||
'PKCS7_NOCHAIN' => 'openssl/openssl.php',
|
||||
'PKCS7_NOINTERN' => 'openssl/openssl.php',
|
||||
'PKCS7_NOOLDMIMETYPE' => 'openssl/openssl.php',
|
||||
'PKCS7_NOSIGS' => 'openssl/openssl.php',
|
||||
'PKCS7_NOVERIFY' => 'openssl/openssl.php',
|
||||
'PKCS7_TEXT' => 'openssl/openssl.php',
|
||||
|
@ -10771,6 +10830,16 @@ const CONSTANTS = array (
|
|||
'POLL_PRI' => 'pcntl/pcntl.php',
|
||||
'POSITIVE_SIGN' => 'standard/standard_defines.php',
|
||||
'POSIX_F_OK' => 'posix/posix.php',
|
||||
'POSIX_PC_ALLOC_SIZE_MIN' => 'posix/posix.php',
|
||||
'POSIX_PC_CHOWN_RESTRICTED' => 'posix/posix.php',
|
||||
'POSIX_PC_LINK_MAX' => 'posix/posix.php',
|
||||
'POSIX_PC_MAX_CANON' => 'posix/posix.php',
|
||||
'POSIX_PC_MAX_INPUT' => 'posix/posix.php',
|
||||
'POSIX_PC_NAME_MAX' => 'posix/posix.php',
|
||||
'POSIX_PC_NO_TRUNC' => 'posix/posix.php',
|
||||
'POSIX_PC_PATH_MAX' => 'posix/posix.php',
|
||||
'POSIX_PC_PIPE_BUF' => 'posix/posix.php',
|
||||
'POSIX_PC_SYMLINK_MAX' => 'posix/posix.php',
|
||||
'POSIX_RLIMIT_AS' => 'posix/posix.php',
|
||||
'POSIX_RLIMIT_CORE' => 'posix/posix.php',
|
||||
'POSIX_RLIMIT_CPU' => 'posix/posix.php',
|
||||
|
@ -10789,6 +10858,10 @@ const CONSTANTS = array (
|
|||
'POSIX_RLIMIT_SIGPENDING' => 'posix/posix.php',
|
||||
'POSIX_RLIMIT_STACK' => 'posix/posix.php',
|
||||
'POSIX_R_OK' => 'posix/posix.php',
|
||||
'POSIX_SC_ARG_MAX' => 'posix/posix.php',
|
||||
'POSIX_SC_NPROCESSORS_CONF' => 'posix/posix.php',
|
||||
'POSIX_SC_NPROCESSORS_ONLN' => 'posix/posix.php',
|
||||
'POSIX_SC_PAGESIZE' => 'posix/posix.php',
|
||||
'POSIX_S_IFBLK' => 'posix/posix.php',
|
||||
'POSIX_S_IFCHR' => 'posix/posix.php',
|
||||
'POSIX_S_IFIFO' => 'posix/posix.php',
|
||||
|
@ -11847,6 +11920,7 @@ const CONSTANTS = array (
|
|||
'SOL_SOCKET' => 'sockets/sockets.php',
|
||||
'SOL_TCP' => 'sockets/sockets.php',
|
||||
'SOL_UDP' => 'sockets/sockets.php',
|
||||
'SOL_UDPLITE' => 'sockets/sockets.php',
|
||||
'SOMAXCONN' => 'sockets/sockets.php',
|
||||
'SORTARRIVAL' => 'imap/imap.php',
|
||||
'SORTCC' => 'imap/imap.php',
|
||||
|
@ -11863,10 +11937,13 @@ const CONSTANTS = array (
|
|||
'SORT_NUMERIC' => 'standard/standard_defines.php',
|
||||
'SORT_REGULAR' => 'standard/standard_defines.php',
|
||||
'SORT_STRING' => 'standard/standard_defines.php',
|
||||
'SO_ATTACH_REUSEPORT_CBPF' => 'sockets/sockets.php',
|
||||
'SO_BINDTODEVICE' => 'sockets/sockets.php',
|
||||
'SO_BPF_EXTENSIONS' => 'sockets/sockets.php',
|
||||
'SO_BROADCAST' => 'sockets/sockets.php',
|
||||
'SO_DEBUG' => 'sockets/sockets.php',
|
||||
'SO_DETACH_BPF' => 'sockets/sockets.php',
|
||||
'SO_DETACH_FILTER' => 'sockets/sockets.php',
|
||||
'SO_DONTROUTE' => 'sockets/sockets.php',
|
||||
'SO_ERROR' => 'sockets/sockets.php',
|
||||
'SO_FREE' => 'imap/imap.php',
|
||||
|
@ -12770,6 +12847,8 @@ const CONSTANTS = array (
|
|||
'TCP_KEEPINTVL' => 'sockets/sockets.php',
|
||||
'TCP_NODELAY' => 'sockets/sockets.php',
|
||||
'TCP_NOTSENT_LOWAT' => 'sockets/sockets.php',
|
||||
'TCP_QUICKACK' => 'sockets/sockets.php',
|
||||
'TCP_REPAIR' => 'sockets/sockets.php',
|
||||
'THOUSANDS_SEP' => 'standard/standard_defines.php',
|
||||
'THOUSEP' => 'standard/standard_defines.php',
|
||||
'TIDY_NODETYPE_ASP' => 'tidy/tidy.php',
|
||||
|
|
|
@ -525,7 +525,8 @@ class ReflectionClass implements Reflector
|
|||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function getStaticProperties(): ?array {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'array'], default: 'array|null')]
|
||||
public function getStaticProperties() {}
|
||||
|
||||
/**
|
||||
* Gets static property value
|
||||
|
|
|
@ -220,4 +220,14 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 8.1
|
||||
*/
|
||||
public function isFinal(): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function hasType(): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function getType(): ?ReflectionType {}
|
||||
}
|
||||
|
|
|
@ -301,4 +301,9 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
|
||||
#[PhpStormStubsElementAvailable(from: '8.2')]
|
||||
public function hasPrototype(): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public static function createFromMethodName(string $method): static {}
|
||||
}
|
||||
|
|
52
SPL/SPL.php
52
SPL/SPL.php
|
@ -1683,20 +1683,18 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
/**
|
||||
* Sort the entries by value
|
||||
* @link https://php.net/manual/en/arrayobject.asort.php
|
||||
* @param int $flags [optional]
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort the entries by key
|
||||
* @link https://php.net/manual/en/arrayobject.ksort.php
|
||||
* @param int $flags [optional]
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort the entries with a user-defined comparison function and maintain key association
|
||||
|
@ -1709,10 +1707,10 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* be respectively less than, equal to, or greater than the
|
||||
* second.
|
||||
* </p>
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort the entries by keys using a user-defined comparison function
|
||||
|
@ -1728,26 +1726,26 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* be respectively less than, equal to, or greater than the
|
||||
* second.
|
||||
* </p>
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort entries using a "natural order" algorithm
|
||||
* @link https://php.net/manual/en/arrayobject.natsort.php
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function natsort(): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function natsort() {}
|
||||
|
||||
/**
|
||||
* Sort an array using a case insensitive "natural order" algorithm
|
||||
* @link https://php.net/manual/en/arrayobject.natcasesort.php
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function natcasesort(): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function natcasesort() {}
|
||||
|
||||
/**
|
||||
* Unserialize an ArrayObject
|
||||
|
@ -1955,20 +1953,18 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
/**
|
||||
* Sort array by values
|
||||
* @link https://php.net/manual/en/arrayiterator.asort.php
|
||||
* @param int $flags [optional]
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort array by keys
|
||||
* @link https://php.net/manual/en/arrayiterator.ksort.php
|
||||
* @param int $flags [optional]
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* User defined sort
|
||||
|
@ -1976,10 +1972,10 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* @param callable $callback <p>
|
||||
* The compare function used for the sort.
|
||||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* User defined sort
|
||||
|
@ -1987,26 +1983,26 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* @param callable $callback <p>
|
||||
* The compare function used for the sort.
|
||||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort an array naturally
|
||||
* @link https://php.net/manual/en/arrayiterator.natsort.php
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function natsort(): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function natsort() {}
|
||||
|
||||
/**
|
||||
* Sort an array naturally, case insensitive
|
||||
* @link https://php.net/manual/en/arrayiterator.natcasesort.php
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function natcasesort(): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function natcasesort() {}
|
||||
|
||||
/**
|
||||
* Unserialize
|
||||
|
|
|
@ -1120,6 +1120,17 @@ define('CURLINFO_HEADER_OUT', 2);
|
|||
* @since 5.2.4
|
||||
*/
|
||||
define('CURLINFO_PRIVATE', 1048597);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLINFO_CAPATH', 1048638);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLINFO_CAINFO', 1048637);
|
||||
|
||||
/**
|
||||
* Supports IPv6
|
||||
* @link https://php.net/manual/en/curl.constants.php
|
||||
|
@ -1151,6 +1162,37 @@ define('CURLVERSION_NOW', 10);
|
|||
* @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
|
||||
*/
|
||||
define('CURLE_OK', 0);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLKHMATCH_OK', 0);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLKHMATCH_MISMATCH', 1);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLKHMATCH_MISSING', 2);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLKHMATCH_LAST', 3);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_MIME_OPTIONS', 315);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLMIMEOPT_FORMESCAPE', 1);
|
||||
|
||||
/**
|
||||
* The URL you passed to libcurl used a protocol that this libcurl does not support.
|
||||
* The support might be a compile-time option that you didn't use,
|
||||
|
@ -2061,6 +2103,41 @@ define('CURLOPT_PROXY_SERVICE_NAME', 10235);
|
|||
*/
|
||||
define('CURLOPT_SERVICE_NAME', 10236);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_SSH_HOSTKEYFUNCTION', 20316);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_PROTOCOLS_STR', 10318);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_REDIR_PROTOCOLS_STR', 10319);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_WS_OPTIONS', 320);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLWS_RAW_MODE', 1);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_CA_CACHE_TIMEOUT', 321);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('CURLOPT_QUICK_EXIT', 322);
|
||||
|
||||
/**
|
||||
* Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
|
||||
* libcurl attempts to connect to ssh-agent or pageant and let the agent attempt the authentication.
|
||||
|
|
|
@ -1100,4 +1100,54 @@ class DatePeriod implements IteratorAggregate
|
|||
|
||||
#[PhpStormStubsElementAvailable(from: '8.2')]
|
||||
public function __unserialize(array $data): void {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public static function createFromISO8601String(string $specification, int $options = 0): static {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateError extends Error {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateObjectError extends DateError {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateRangeError extends DateError {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateException extends Exception {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateInvalidTimeZoneException extends DateException {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateInvalidOperationException extends DateException {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateMalformedStringException extends DateException {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateMalformedIntervalStringException extends DateException {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class DateMalformedPeriodStringException extends DateException {}
|
||||
|
|
|
@ -142,6 +142,8 @@ class DOMNode
|
|||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $textContent;
|
||||
public bool $isConnected;
|
||||
public ?DOMElement $parentElement;
|
||||
|
||||
/**
|
||||
* Adds a new child before a reference node
|
||||
|
@ -318,9 +320,15 @@ class DOMNode
|
|||
/**
|
||||
* @param DOMNode $arg
|
||||
* @return bool
|
||||
* @removed 8.0
|
||||
*/
|
||||
public function isEqualNode(DOMNode $arg) {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function isEqualNode(?DOMNode $otherNode): bool {}
|
||||
|
||||
/**
|
||||
* @param $feature
|
||||
* @param $version
|
||||
|
@ -391,6 +399,16 @@ class DOMNode
|
|||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
|
||||
): int|false {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function contains(DOMNode|DOMNameSpaceNode|null $other): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function getRootNode(?array $options = []): DOMNode {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -577,6 +595,8 @@ class DOMNameSpaceNode
|
|||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $nodeName;
|
||||
public ?DOMElement $parentElement;
|
||||
public bool $isConnected;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -616,6 +636,12 @@ class DOMDocumentFragment extends DOMNode implements DOMParentNode
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepend(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceChildren(...$nodes): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1001,9 +1027,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
#[TentativeType]
|
||||
public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $node
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'DOMNode|false'], default: '')]
|
||||
public function adoptNode(DOMNode $node) {}
|
||||
|
||||
/**
|
||||
|
@ -1016,6 +1041,12 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
*/
|
||||
public function prepend(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceChildren(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* Normalizes the document
|
||||
* @link https://php.net/manual/en/domdocument.normalizedocument.php
|
||||
|
@ -1041,10 +1072,12 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Bitwise OR
|
||||
* of the libxml option constants.
|
||||
* </p>
|
||||
* @return DOMDocument|bool true on success or false on failure. If called statically, returns a
|
||||
* @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a
|
||||
* DOMDocument and issues E_STRICT
|
||||
* warning.
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')]
|
||||
public function load(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null
|
||||
|
@ -1073,10 +1106,12 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Bitwise OR
|
||||
* of the libxml option constants.
|
||||
* </p>
|
||||
* @return DOMDocument|bool true on success or false on failure. If called statically, returns a
|
||||
* @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a
|
||||
* DOMDocument and issues E_STRICT
|
||||
* warning.
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')]
|
||||
public function loadXML(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null
|
||||
|
@ -1142,10 +1177,12 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Since PHP 5.4.0 and Libxml 2.6.0, you may also
|
||||
* use the options parameter to specify additional Libxml parameters.
|
||||
* </p>
|
||||
* @return DOMDocument|bool true on success or false on failure. If called statically, returns a
|
||||
* @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a
|
||||
* DOMDocument and issues E_STRICT
|
||||
* warning.
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')]
|
||||
public function loadHTML(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0
|
||||
|
@ -1161,10 +1198,12 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Since PHP 5.4.0 and Libxml 2.6.0, you may also
|
||||
* use the options parameter to specify additional Libxml parameters.
|
||||
* </p>
|
||||
* @return DOMDocument|bool true on success or false on failure. If called statically, returns a
|
||||
* @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a
|
||||
* DOMDocument and issues E_STRICT
|
||||
* warning.
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')]
|
||||
public function loadHTMLFile(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0
|
||||
|
@ -1443,10 +1482,10 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* @param string $data <p>
|
||||
* The string to append.
|
||||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
|
||||
/**
|
||||
* Insert a string at the specified 16-bit unit offset
|
||||
|
@ -1679,6 +1718,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
|
||||
public $nextElementSibling;
|
||||
public string $id;
|
||||
public string $className;
|
||||
|
||||
/**
|
||||
* Returns value of attribute
|
||||
|
@ -1976,6 +2017,12 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
*/
|
||||
public function prepend(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceChildren(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* Creates a new DOMElement object
|
||||
* @link https://php.net/manual/en/domelement.construct.php
|
||||
|
@ -1989,6 +2036,26 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function getAttributeNames(): array {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function toggleAttribute(string $qualifiedName, ?bool $force = false): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function insertAdjacentElement(string $where, DOMElement $element): ?DOMElement {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function insertAdjacentText(string $where, string $data): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2455,6 +2522,11 @@ interface DOMParentNode
|
|||
* @since 8.0
|
||||
*/
|
||||
public function prepend(...$nodes): void;
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function replaceChildren(...$nodes): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
11
gd/gd.php
11
gd/gd.php
|
@ -818,11 +818,16 @@ function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x,
|
|||
* Specifies the color of the uncovered zone after the rotation
|
||||
* </p>
|
||||
* @param bool $ignore_transparent [optional] <p>
|
||||
* If set and non-zero, transparent colors are ignored (otherwise kept).
|
||||
* Prior to PHP 8.3 if set and non-zero, transparent colors are ignored (otherwise kept).
|
||||
* </p>
|
||||
* @return resource|GdImage|false the rotated image or <b>FALSE</b> on failure
|
||||
*/
|
||||
function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {}
|
||||
function imagerotate(
|
||||
GdImage $image,
|
||||
float $angle,
|
||||
int $background_color,
|
||||
#[PhpStormStubsElementAvailable(to: '8.2')] bool $ignore_transparent = false
|
||||
): GdImage|false {}
|
||||
|
||||
/**
|
||||
* Should antialias functions be used or not. <br/>
|
||||
|
@ -1116,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {}
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {}
|
||||
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = 1): bool {}
|
||||
|
||||
/**
|
||||
* Destroy an image
|
||||
|
|
|
@ -296,7 +296,7 @@ function hash_pbkdf2(
|
|||
int $iterations,
|
||||
int $length = 0,
|
||||
bool $binary = false,
|
||||
#[PhpStormStubsElementAvailable(from: '8.1', to: '8.1')] array $options = []
|
||||
#[PhpStormStubsElementAvailable(from: '8.1')] array $options = []
|
||||
): string {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -86,9 +86,10 @@ function imap_reopen(
|
|||
* deletion. You can achieve the same thing by using
|
||||
* <b>imap_expunge</b>
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @return bool|true <b>TRUE</b> on success or <b>FALSE</b> on failure. Since PHP 8.3 always true
|
||||
*/
|
||||
function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0) {}
|
||||
|
||||
/**
|
||||
* Gets the number of messages in the current mailbox
|
||||
|
@ -491,21 +492,21 @@ function imap_fetchstructure(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection
|
|||
* <b>IMAP_GC_ENV</b> (enveloppe and bodies),
|
||||
* <b>IMAP_GC_TEXTS</b> (texts).
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_gc(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $flags = 0,
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')] int $flags
|
||||
): bool {}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Delete all messages marked for deletion
|
||||
* @link https://php.net/manual/en/function.imap-expunge.php
|
||||
* @param resource $imap
|
||||
* @return bool <b>TRUE</b>.
|
||||
*/
|
||||
function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap) {}
|
||||
|
||||
/**
|
||||
* Mark a message for deletion from current mailbox
|
||||
|
@ -519,8 +520,8 @@ function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], def
|
|||
* to treat the <i>msg_number</i> argument as an
|
||||
* UID.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b>.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
|
@ -531,8 +532,8 @@ function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], defa
|
|||
* The message number
|
||||
* </p>
|
||||
* @param int $flags [optional]
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
|
@ -886,8 +887,8 @@ function imap_mailboxmsginfo(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection
|
|||
* A bit mask that may contain the single option:
|
||||
* <b>ST_UID</b> - The sequence argument contains UIDs
|
||||
* instead of sequence numbers</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL): bool {}
|
||||
|
||||
/**
|
||||
|
@ -908,8 +909,8 @@ function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection']
|
|||
* the single option:
|
||||
* <b>ST_UID</b> - The sequence argument contains UIDs
|
||||
* instead of sequence numbers</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0): bool {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -902,12 +902,13 @@ class IntlChar
|
|||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'bool|null')]
|
||||
public static function enumCharNames(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $start,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $end,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
|
||||
): ?bool {}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Enumerate all code points with their Unicode general categories
|
||||
|
|
472
intl/intl.php
472
intl/intl.php
File diff suppressed because it is too large
Load Diff
|
@ -235,6 +235,11 @@ function json_last_error(): int {}
|
|||
#[Pure]
|
||||
function json_last_error_msg(): string {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function json_validate(string $json, int $depth = 512, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* All < and > are converted to \u003C and \u003E.
|
||||
* @link https://php.net/manual/en/json.constants.php
|
||||
|
|
|
@ -1422,6 +1422,11 @@ function ldap_count_references(
|
|||
#[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
): int {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function ldap_exop_sync(LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): LDAP\Result|bool {}
|
||||
|
||||
define('LDAP_ESCAPE_FILTER', 1);
|
||||
define('LDAP_ESCAPE_DN', 2);
|
||||
define('LDAP_DEREF_NEVER', 0);
|
||||
|
|
|
@ -1416,6 +1416,11 @@ function mbereg_search_setpos($position) {}
|
|||
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
|
||||
function mb_str_split(string $string, int $length = 1, ?string $encoding) {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string {}
|
||||
|
||||
/**
|
||||
* @removed 8.0
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,8 @@ class Deprecated
|
|||
"7.4",
|
||||
"8.0",
|
||||
"8.1",
|
||||
"8.2"
|
||||
"8.2",
|
||||
"8.3"
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -1323,10 +1323,10 @@ class mysqli_result implements IteratorAggregate
|
|||
* The field number. This value must be in the range from
|
||||
* 0 to number of fields - 1.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function field_seek(int $index): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
public function field_seek(int $index) {}
|
||||
|
||||
/**
|
||||
* Frees the memory associated with a result
|
||||
|
@ -2010,9 +2010,9 @@ function mysqli_field_count(mysqli $mysql): int {}
|
|||
* @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
|
||||
* mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
|
||||
* @param int $index The field number. This value must be in the range from 0 to number of fields - 1.
|
||||
* @return bool
|
||||
*/
|
||||
function mysqli_field_seek(mysqli_result $result, int $index): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function mysqli_field_seek(mysqli_result $result, int $index) {}
|
||||
|
||||
/**
|
||||
* Get current field offset of a result pointer
|
||||
|
|
|
@ -1387,6 +1387,11 @@ define('PKCS7_NOATTR', 256);
|
|||
*/
|
||||
define('PKCS7_BINARY', 128);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('PKCS7_NOOLDMIMETYPE', 1024);
|
||||
|
||||
/**
|
||||
* Don't try and verify the signatures on a message
|
||||
* @link https://php.net/manual/en/openssl.constants.php
|
||||
|
@ -1477,6 +1482,11 @@ define('OPENSSL_DEFAULT_STREAM_CIPHERS', "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS
|
|||
"DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:" .
|
||||
"AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH");
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('OPENSSL_CMS_OLDMIMETYPE', 1024);
|
||||
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
|
|
|
@ -99,9 +99,9 @@ function pg_pconnect(
|
|||
* is used. The default connection is the last connection made by
|
||||
* <b>pg_connect</b> or <b>pg_pconnect</b>.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function pg_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function pg_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null) {}
|
||||
|
||||
/**
|
||||
* Poll the status of an in-progress asynchronous PostgreSQL connection attempt.
|
||||
|
@ -1230,9 +1230,15 @@ function pg_copy_from(
|
|||
* is used. The default connection is the last connection made by
|
||||
* <b>pg_connect</b> or <b>pg_pconnect</b>.
|
||||
* </p>
|
||||
* @param int $trace_mode Since PHP 8.3 optional trace mode
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function pg_trace(string $filename, string $mode = "w", #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}
|
||||
function pg_trace(
|
||||
string $filename,
|
||||
string $mode = "w",
|
||||
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null,
|
||||
#[PhpStormStubsElementAvailable(from: '8.3')] int $trace_mode = 0
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Disable tracing of a PostgreSQL connection
|
||||
|
@ -1243,9 +1249,9 @@ function pg_trace(string $filename, string $mode = "w", #[LanguageLevelTypeAware
|
|||
* is used. The default connection is the last connection made by
|
||||
* <b>pg_connect</b> or <b>pg_pconnect</b>.
|
||||
* </p>
|
||||
* @return bool Always returns <b>TRUE</b>.
|
||||
*/
|
||||
function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null) {}
|
||||
|
||||
/**
|
||||
* Create a large object
|
||||
|
@ -2066,6 +2072,31 @@ function pg_consume_input(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection']
|
|||
*/
|
||||
function pg_flush(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int|bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function pg_pipeline_status(PgSql\Connection $connection): int {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function pg_pipeline_sync(PgSql\Connection $connection): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function pg_exit_pipeline_mode(PgSql\Connection $connection): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function pg_enter_pipeline_mode(PgSql\Connection $connection): bool {}
|
||||
|
||||
define('PGSQL_LIBPQ_VERSION', "15.4");
|
||||
define('PGSQL_LIBPQ_VERSION_STR', "15.4");
|
||||
|
||||
|
@ -2426,4 +2457,15 @@ const PGSQL_DIAG_COLUMN_NAME = 99;
|
|||
const PGSQL_DIAG_DATATYPE_NAME = 100;
|
||||
const PGSQL_DIAG_CONSTRAINT_NAME = 110;
|
||||
const PGSQL_DIAG_SEVERITY_NONLOCALIZED = 86;
|
||||
|
||||
const PGSQL_ERRORS_SQLSTATE = 0;
|
||||
const PGSQL_TRACE_REGRESS_MODE = 2;
|
||||
const PGSQL_PIPELINE_SYNC = 10;
|
||||
const PGSQL_PIPELINE_ON = 1;
|
||||
const PGSQL_PIPELINE_OFF = 0;
|
||||
const PGSQL_PIPELINE_ABORTED = 2;
|
||||
const PGSQL_SHOW_CONTEXT_NEVER = 0;
|
||||
const PGSQL_SHOW_CONTEXT_ERRORS = 1;
|
||||
const PGSQL_SHOW_CONTEXT_ALWAYS = 2;
|
||||
|
||||
// End of pgsql v.
|
||||
|
|
|
@ -69,6 +69,16 @@
|
|||
<file>tests/StubsPhp81Tests.php</file>
|
||||
</testsuite>
|
||||
<testsuite name="PHP_8.2">
|
||||
<file>tests/BaseClassesTest.php</file>
|
||||
<file>tests/BaseConstantsTest.php</file>
|
||||
<file>tests/BaseFunctionsTest.php</file>
|
||||
<file>tests/StubsMetaExpectedArgumentsTest.php</file>
|
||||
<file>tests/StubsMetaInternalTagTest.php</file>
|
||||
<file>tests/StubsParameterNamesTest.php</file>
|
||||
<file>tests/StubsTypeHintsTest.php</file>
|
||||
<file>tests/StubsForbiddenTypeHintsTest.php</file>
|
||||
</testsuite>
|
||||
<testsuite name="PHP_8.3">
|
||||
<file>tests/BaseClassesTest.php</file>
|
||||
<file>tests/BaseConstantsTest.php</file>
|
||||
<file>tests/BaseFunctionsTest.php</file>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of posix v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -700,7 +701,7 @@ function posix_getpwuid(int $user_id): array|false {}
|
|||
* </table>
|
||||
*/
|
||||
#[Pure]
|
||||
function posix_getrlimit(): array|false {}
|
||||
function posix_getrlimit(#[PhpStormStubsElementAvailable(from: '8.3')] ?int $resource = null): array|false {}
|
||||
|
||||
/**
|
||||
* Retrieve the error number set by the last posix function that failed
|
||||
|
@ -745,6 +746,16 @@ function posix_strerror(int $error_code): string {}
|
|||
#[Pure]
|
||||
function posix_initgroups(string $username, int $group_id): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function posix_sysconf(int $conf_id): int {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function posix_eaccess(string $filename, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Check whether the file exists.
|
||||
* @link https://php.net/manual/en/posix.constants.php
|
||||
|
@ -910,4 +921,19 @@ define('POSIX_RLIMIT_STACK', 3);
|
|||
*/
|
||||
define('POSIX_RLIMIT_INFINITY', 9223372036854775807);
|
||||
|
||||
define('POSIX_SC_ARG_MAX', 0);
|
||||
define('POSIX_SC_PAGESIZE', 30);
|
||||
define('POSIX_SC_NPROCESSORS_CONF', 83);
|
||||
define('POSIX_SC_NPROCESSORS_ONLN', 84);
|
||||
define('POSIX_PC_LINK_MAX', 0);
|
||||
define('POSIX_PC_MAX_CANON', 1);
|
||||
define('POSIX_PC_MAX_INPUT', 2);
|
||||
define('POSIX_PC_NAME_MAX', 3);
|
||||
define('POSIX_PC_PATH_MAX', 4);
|
||||
define('POSIX_PC_PIPE_BUF', 5);
|
||||
define('POSIX_PC_CHOWN_RESTRICTED', 6);
|
||||
define('POSIX_PC_NO_TRUNC', 7);
|
||||
define('POSIX_PC_ALLOC_SIZE_MIN', 18);
|
||||
define('POSIX_PC_SYMLINK_MAX', 19);
|
||||
|
||||
// End of posix v.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace {
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
|
@ -14,7 +15,7 @@ namespace {
|
|||
/**
|
||||
* Seeds the Mersenne Twister Random Number Generator
|
||||
* @link https://php.net/manual/en/function.mt-srand.php
|
||||
* @param int $seed <p>
|
||||
* @param int|null $seed <p>
|
||||
* An optional seed value
|
||||
* </p>
|
||||
* @param int $mode [optional] <p>
|
||||
|
@ -23,7 +24,7 @@ namespace {
|
|||
* @return void
|
||||
*/
|
||||
function mt_srand(
|
||||
int $seed = null,
|
||||
#[LanguageLevelTypeAware(['8.3' => 'int|null'], default: 'int')] $seed = null,
|
||||
#[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
|
||||
): void {}
|
||||
|
||||
|
@ -33,7 +34,7 @@ namespace {
|
|||
* an alias of {@see mt_srand()}.
|
||||
* </p>
|
||||
* @link https://php.net/manual/en/function.srand.php
|
||||
* @param int $seed <p>
|
||||
* @param int|null $seed <p>
|
||||
* Optional seed value
|
||||
* </p>
|
||||
* @param int $mode [optional] <p>
|
||||
|
@ -42,7 +43,7 @@ namespace {
|
|||
* @return void
|
||||
*/
|
||||
function srand(
|
||||
int $seed = null,
|
||||
#[LanguageLevelTypeAware(['8.3' => 'int|null'], default: 'int')] $seed = null,
|
||||
#[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
|
||||
): void {}
|
||||
|
||||
|
@ -214,6 +215,21 @@ namespace Random
|
|||
public function __serialize(): array {}
|
||||
|
||||
public function __unserialize(array $data): void {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function nextFloat(): float {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function getFloat(float $min, float $max, IntervalBoundary $boundary = IntervalBoundary::ClosedOpen): float {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
public function getBytesFromString(string $string, int $length): string {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -230,4 +246,19 @@ namespace Random
|
|||
* @since 8.2
|
||||
*/
|
||||
class RandomException extends Exception {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
enum IntervalBoundary
|
||||
{
|
||||
public string $name;
|
||||
|
||||
case ClosedOpen;
|
||||
case ClosedClosed;
|
||||
case OpenClosed;
|
||||
case OpenOpen;
|
||||
|
||||
public static function cases(): array {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1400,6 +1400,11 @@ function socket_wsaprotocol_info_import($info_id) {}
|
|||
*/
|
||||
function socket_wsaprotocol_info_release($info_id) {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function socket_atmark(Socket $socket): bool {}
|
||||
|
||||
define('AF_UNIX', 1);
|
||||
define('AF_INET', 2);
|
||||
|
||||
|
@ -1462,7 +1467,12 @@ define('SO_RCVTIMEO', 20);
|
|||
define('SO_TYPE', 3);
|
||||
define('SO_ERROR', 4);
|
||||
define('SO_BINDTODEVICE', 25);
|
||||
define('SO_ATTACH_REUSEPORT_CBPF', 51);
|
||||
define('SO_DETACH_FILTER', 27);
|
||||
define('SO_DETACH_BPF', 27);
|
||||
|
||||
define('SOL_SOCKET', 1);
|
||||
define('SOL_UDPLITE', 136);
|
||||
define('SOMAXCONN', 128);
|
||||
/**
|
||||
* @since 8.1
|
||||
|
@ -1560,6 +1570,14 @@ define('IPV6_MULTICAST_HOPS', 18);
|
|||
*/
|
||||
define('IPV6_MULTICAST_LOOP', 19);
|
||||
define('IPV6_V6ONLY', 26);
|
||||
define('IP_BIND_ADDRESS_NO_PORT', 24);
|
||||
define('IP_MTU_DISCOVER', 10);
|
||||
define('IP_PMTUDISC_DO', 2);
|
||||
define('IP_PMTUDISC_DONT', 0);
|
||||
define('IP_PMTUDISC_WANT', 1);
|
||||
define('IP_PMTUDISC_PROBE', 3);
|
||||
define('IP_PMTUDISC_INTERFACE', 4);
|
||||
define('IP_PMTUDISC_OMIT', 5);
|
||||
|
||||
/**
|
||||
* Operation not permitted.
|
||||
|
@ -2326,6 +2344,16 @@ define('TCP_KEEPINTVL', 5);
|
|||
*/
|
||||
define('TCP_KEEPCNT', 6);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('TCP_QUICKACK', 12);
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
define('TCP_REPAIR', 19);
|
||||
|
||||
/**
|
||||
* Socket_set_option for the socket_send* functions.
|
||||
* It avoids copy b/w userland and kernel for both TCP and UDP protocols.
|
||||
|
|
|
@ -6,6 +6,11 @@ use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
|||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
class SQLite3Exception extends \Exception {}
|
||||
|
||||
/**
|
||||
* A class that interfaces SQLite 3 databases.
|
||||
* @link https://php.net/manual/en/class.sqlite3.php
|
||||
|
|
|
@ -244,12 +244,12 @@ function debug_zval_dump(
|
|||
* to true, print_r will return its output, instead of
|
||||
* printing it (which it does by default).
|
||||
* </p>
|
||||
* @return string|true If given a string, integer or float,
|
||||
* @return string|bool If given a string, integer or float,
|
||||
* the value itself will be printed. If given an array, values
|
||||
* will be presented in a format that shows keys and elements. Similar
|
||||
* notation is used for objects.
|
||||
*/
|
||||
function print_r(mixed $value, bool $return = false): string|true {}
|
||||
function print_r(mixed $value, bool $return = false): string|bool {}
|
||||
|
||||
/**
|
||||
* Returns the amount of memory allocated to PHP
|
||||
|
|
|
@ -589,6 +589,11 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st
|
|||
*/
|
||||
function stream_supports_lock($stream): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.3
|
||||
*/
|
||||
function stream_context_set_options($context, array $options): bool {}
|
||||
|
||||
/**
|
||||
* Gets line from file pointer and parse for CSV fields
|
||||
* @link https://php.net/manual/en/function.fgetcsv.php
|
||||
|
|
|
@ -59,7 +59,6 @@ use JetBrains\PhpStorm\Pure;
|
|||
* (strerror) corresponding to the present value of
|
||||
* errno.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function syslog(int $priority, string $message): bool {}
|
||||
|
@ -67,7 +66,6 @@ function syslog(int $priority, string $message): bool {}
|
|||
/**
|
||||
* Close connection to system logger
|
||||
* @link https://php.net/manual/en/function.closelog.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function closelog(): bool {}
|
||||
|
@ -140,7 +138,7 @@ function define_syslog_variables() {}
|
|||
*/
|
||||
#[Pure]
|
||||
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
|
||||
function metaphone(string $string, int $max_phonemes = 0): false|string {}
|
||||
function metaphone(string $string, int $max_phonemes = 0) {}
|
||||
|
||||
/**
|
||||
* Turn on output buffering
|
||||
|
@ -395,7 +393,6 @@ function ob_list_handlers(): array {}
|
|||
* parameter sort_flags, for details
|
||||
* see sort.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function ksort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
|
@ -411,7 +408,6 @@ function ksort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* sort_flags, for details see
|
||||
* sort.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function krsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
|
@ -422,9 +418,9 @@ function krsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* @param array &$array <p>
|
||||
* The input array.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function natsort(array &$array): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function natsort(array &$array) {}
|
||||
|
||||
/**
|
||||
* Sort an array using a case insensitive "natural order" algorithm
|
||||
|
@ -432,9 +428,9 @@ function natsort(array &$array): bool {}
|
|||
* @param array &$array <p>
|
||||
* The input array.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function natcasesort(array &$array): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function natcasesort(array &$array) {}
|
||||
|
||||
/**
|
||||
* Sort an array and maintain index association
|
||||
|
@ -447,10 +443,9 @@ function natcasesort(array &$array): bool {}
|
|||
* parameter sort_flags, for details
|
||||
* see sort.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function asort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
function asort(array &$array, int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort an array in reverse order and maintain index association
|
||||
|
@ -463,7 +458,6 @@ function asort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* sort_flags, for details see
|
||||
* sort.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function arsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
|
@ -482,7 +476,6 @@ function arsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* Sorting type flags:<br>
|
||||
* SORT_REGULAR - compare items normally
|
||||
* (don't change types)</p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function sort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
|
@ -498,9 +491,9 @@ function sort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* parameter sort_flags, for details see
|
||||
* sort.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function rsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
||||
#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')]
|
||||
function rsort(array &$array, int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort an array by values using a user-defined comparison function
|
||||
|
@ -513,7 +506,6 @@ function rsort(array &$array, int $flags = SORT_REGULAR): bool {}
|
|||
* greater than zero if the first argument is considered to be
|
||||
* respectively less than, equal to, or greater than the second.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function usort(array &$array, callable $callback): bool {}
|
||||
|
@ -528,7 +520,6 @@ function usort(array &$array, callable $callback): bool {}
|
|||
* See usort and uksort for
|
||||
* examples of user-defined comparison functions.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function uasort(array &$array, callable $callback): bool {}
|
||||
|
@ -550,7 +541,6 @@ function uasort(array &$array, callable $callback): bool {}
|
|||
* be respectively less than, equal to, or greater than the
|
||||
* second.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function uksort(array &$array, callable $callback): bool {}
|
||||
|
@ -561,7 +551,6 @@ function uksort(array &$array, callable $callback): bool {}
|
|||
* @param array &$array <p>
|
||||
* The array.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function shuffle(array &$array): bool {}
|
||||
|
@ -596,7 +585,6 @@ function shuffle(array &$array): bool {}
|
|||
* it will be passed as the third parameter to the callback
|
||||
* funcname.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function array_walk(object|array &$array, callable $callback, mixed $arg): bool {}
|
||||
|
@ -625,7 +613,6 @@ function array_walk(object|array &$array, callable $callback, mixed $arg): bool
|
|||
* it will be passed as the third parameter to the callback
|
||||
* funcname.
|
||||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
|
||||
function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): bool {}
|
||||
|
@ -937,7 +924,11 @@ function array_fill_keys(array $keys, mixed $value): array {}
|
|||
* end, inclusive.
|
||||
*/
|
||||
#[Pure]
|
||||
function range($start, $end, int|float $step = 1): array {}
|
||||
function range(
|
||||
#[LanguageLevelTypeAware(['8.3' => 'string|int|float'], default: '')] $start,
|
||||
#[LanguageLevelTypeAware(['8.3' => 'string|int|float'], default: '')] $end,
|
||||
int|float $step = 1
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* Sort multiple or multi-dimensional arrays
|
||||
|
|
|
@ -948,6 +948,7 @@ class AssertionError extends Error {}
|
|||
* An optional new value for the option.
|
||||
* </p>
|
||||
* @return mixed The original setting of any option.
|
||||
* @deprecated
|
||||
*/
|
||||
function assert_options(int $option, mixed $value): mixed {}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase;
|
|||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPConst;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Parsers\ParserUtils;
|
||||
|
@ -75,12 +76,15 @@ abstract class AbstractBaseStubsTestCase extends TestCase
|
|||
if ($class === 'self' && $contextClass !== null) {
|
||||
$class = $contextClass->name;
|
||||
}
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class) ??
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class) ??
|
||||
PhpStormStubsSingleton::getPhpStormStubs()->getClass($class) ??
|
||||
PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class);
|
||||
if ($parentClass === null) {
|
||||
throw new Exception("Class $class not found in stubs");
|
||||
}
|
||||
if ((string)$defaultValue->name === 'class') {
|
||||
if ($parentClass instanceof PHPEnum) {
|
||||
$value = $parentClass->name . "::" . $defaultValue->name;
|
||||
} elseif ((string)$defaultValue->name === 'class') {
|
||||
$value = (string)$defaultValue->class;
|
||||
} else {
|
||||
$constant = $parentClass->getConstant((string)$defaultValue->name);;
|
||||
|
@ -90,6 +94,8 @@ abstract class AbstractBaseStubsTestCase extends TestCase
|
|||
$value = "null";
|
||||
} elseif (is_array($defaultValue) || $defaultValue instanceof Array_) {
|
||||
$value = '[]';
|
||||
} elseif ($defaultValue instanceof \UnitEnum){
|
||||
$value = get_class($defaultValue) . "::" . $defaultValue->name;
|
||||
} else {
|
||||
$value = strval($defaultValue);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace StubTests;
|
|||
use PHPUnit\Framework\Exception;
|
||||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
use StubTests\Model\PHPProperty;
|
||||
|
@ -45,10 +46,12 @@ class BaseClassesTest extends AbstractBaseStubsTestCase
|
|||
* @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionMethodsProvider::classMethodsProvider
|
||||
* @throws Exception|RuntimeException
|
||||
*/
|
||||
public function testClassesMethodsExist(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
public function testClassesMethodsExist(PHPClass|PHPInterface|PHPEnum $class, PHPMethod $method)
|
||||
{
|
||||
$className = $class->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className);
|
||||
} else {
|
||||
$stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className);
|
||||
|
@ -63,7 +66,9 @@ class BaseClassesTest extends AbstractBaseStubsTestCase
|
|||
public function testClassesFinalMethods(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$className = $class->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name);
|
||||
|
@ -82,7 +87,9 @@ class BaseClassesTest extends AbstractBaseStubsTestCase
|
|||
public function testClassesStaticMethods(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$className = $class->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name);
|
||||
|
@ -101,7 +108,9 @@ class BaseClassesTest extends AbstractBaseStubsTestCase
|
|||
public function testClassesMethodsVisibility(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$className = $class->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name);
|
||||
|
@ -120,7 +129,9 @@ class BaseClassesTest extends AbstractBaseStubsTestCase
|
|||
public function testClassMethodsParametersCount(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$className = $class->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name);
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
FROM php:8.3.0beta3-alpine
|
||||
|
||||
RUN set -eux; \
|
||||
apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache --virtual .build-deps \
|
||||
bash gcc g++ make autoconf pkgconfig git \
|
||||
libmcrypt-dev imap-dev php-imap enchant2 php-enchant bzip2-dev gettext-dev libxml2-dev php82-dev php-gd icu-dev \
|
||||
php-zip php-tidy php-intl libffi-dev openssl-dev php82-pear rabbitmq-c rabbitmq-c-dev librrd \
|
||||
libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \
|
||||
libpng-dev gpgme gpgme-dev libpq-dev aspell-dev
|
||||
|
||||
RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \
|
||||
pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell
|
||||
|
||||
WORKDIR /opt/project/phpstorm-stubs
|
|
@ -1,8 +1,26 @@
|
|||
FROM php:8.1-apache
|
||||
FROM php:8.3.0beta3-apache
|
||||
|
||||
RUN echo 'memory_limit = 1024M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
RUN apt-get update && apt-get -y install git zip unzip
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install git -y && \
|
||||
git clone https://github.com/xdebug/xdebug
|
||||
WORKDIR xdebug
|
||||
RUN phpize && \
|
||||
chmod +x configure && \
|
||||
./configure --enable-xdebug && \
|
||||
make && \
|
||||
make install
|
||||
# Enable xdebug extension
|
||||
RUN echo "zend_extension=$(php-config --extension-dir)/xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
#RUN pecl install xdebug
|
||||
#RUN docker-php-ext-enable xdebug
|
||||
RUN echo "xdebug.mode=develop,debug,coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
#RUN echo "xdebug.remote_host=192.168.178.178" >> /usr/local/etc/php/php.ini
|
||||
RUN echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/php.ini
|
||||
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.output_dir=/opt/project/xdebug_snapshots" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.log=/opt/project/xdebug_logs/xdebug33php82.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
WORKDIR /opt/project/phpstorm-stubs
|
||||
|
|
|
@ -36,6 +36,23 @@ abstract class BasePHPClass extends BasePHPElement
|
|||
}
|
||||
}
|
||||
|
||||
public function addEnumCase(PHPEnumCase $parsedConstant)
|
||||
{
|
||||
if (isset($parsedConstant->name)) {
|
||||
if (array_key_exists($parsedConstant->name, $this->constants)) {
|
||||
$amount = count(array_filter(
|
||||
$this->constants,
|
||||
function (PHPConst $nextConstant) use ($parsedConstant) {
|
||||
return $nextConstant->name === $parsedConstant->name;
|
||||
}
|
||||
));
|
||||
$this->constants[$parsedConstant->name . '_duplicated_' . $amount] = $parsedConstant;
|
||||
} else {
|
||||
$this->constants[$parsedConstant->name] = $parsedConstant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PHPConst|null
|
||||
* @throws RuntimeException
|
||||
|
|
|
@ -8,6 +8,7 @@ use PhpParser\Node\Expr\Cast;
|
|||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Expr\UnaryMinus;
|
||||
use PhpParser\Node\Stmt\ClassConst;
|
||||
use PhpParser\Node\Stmt\Enum_;
|
||||
use PhpParser\Node\Stmt\Namespace_;
|
||||
use PhpParser\NodeAbstract;
|
||||
use ReflectionClassConstant;
|
||||
|
@ -107,9 +108,14 @@ class PHPConst extends BasePHPElement
|
|||
protected function getConstantFQN(NodeAbstract $node, $nodeName)
|
||||
{
|
||||
$namespace = '';
|
||||
$parentParentNode = $node->getAttribute('parent')->getAttribute('parent');
|
||||
if ($parentParentNode instanceof Namespace_ && !empty($parentParentNode->name)) {
|
||||
$namespace = '\\' . implode('\\', $parentParentNode->name->parts) . '\\';
|
||||
$parentNode = $node->getAttribute('parent');
|
||||
if ($parentNode instanceof Enum_) {
|
||||
return $nodeName;
|
||||
} else {
|
||||
$parentParentNode = $parentNode->getAttribute('parent');
|
||||
if ($parentParentNode instanceof Namespace_ && !empty($parentParentNode->name)) {
|
||||
$namespace = '\\' . implode('\\', $parentParentNode->name->parts) . '\\';
|
||||
}
|
||||
}
|
||||
|
||||
return $namespace . $nodeName;
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
namespace StubTests\Model;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\PropertyRead;
|
||||
use phpDocumentor\Reflection\DocBlockFactory;
|
||||
use PhpParser\Node\Stmt\Enum_;
|
||||
use ReflectionClass;
|
||||
|
||||
class PHPEnum extends PHPClass
|
||||
{
|
||||
/**
|
||||
* @param ReflectionClass $reflectionObject
|
||||
* @return static
|
||||
*/
|
||||
public function readObjectFromReflection($reflectionObject)
|
||||
{
|
||||
$this->name = $reflectionObject->getName();
|
||||
$this->interfaces = $reflectionObject->getInterfaceNames();
|
||||
$this->isFinal = $reflectionObject->isFinal();
|
||||
if (method_exists($reflectionObject, 'isReadOnly')) {
|
||||
$this->isReadonly = $reflectionObject->isReadOnly();
|
||||
}
|
||||
foreach ($reflectionObject->getMethods() as $method) {
|
||||
if ($method->getDeclaringClass()->getName() !== $this->name) {
|
||||
continue;
|
||||
}
|
||||
$parsedMethod = (new PHPMethod())->readObjectFromReflection($method);
|
||||
$this->addMethod($parsedMethod);
|
||||
}
|
||||
|
||||
if (method_exists($reflectionObject, 'getReflectionConstants')) {
|
||||
foreach ($reflectionObject->getReflectionConstants() as $constant) {
|
||||
if ($constant->getDeclaringClass()->getName() !== $this->name) {
|
||||
continue;
|
||||
}
|
||||
if ($constant->isEnumCase()) {
|
||||
$enumCase = (new PHPEnumCase())->readObjectFromReflection($constant);
|
||||
$this->addEnumCase($enumCase);
|
||||
} else {
|
||||
$parsedConstant = (new PHPConst())->readObjectFromReflection($constant);
|
||||
$this->addConstant($parsedConstant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($reflectionObject->getProperties() as $property) {
|
||||
if ($property->getDeclaringClass()->getName() !== $this->name) {
|
||||
continue;
|
||||
}
|
||||
$parsedProperty = (new PHPProperty())->readObjectFromReflection($property);
|
||||
$this->addProperty($parsedProperty);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Enum_ $node
|
||||
* @return static
|
||||
*/
|
||||
public function readObjectFromStubNode($node)
|
||||
{
|
||||
$this->name = self::getFQN($node);
|
||||
$this->availableVersionsRangeFromAttribute = self::findAvailableVersionsRangeFromAttribute($node->attrGroups);
|
||||
$this->collectTags($node);
|
||||
if (!empty($node->extends)) {
|
||||
$this->parentClass = '';
|
||||
foreach ($node->extends->parts as $part) {
|
||||
$this->parentClass .= "\\$part";
|
||||
}
|
||||
$this->parentClass = ltrim($this->parentClass, "\\");
|
||||
}
|
||||
if (!empty($node->implements)) {
|
||||
foreach ($node->implements as $interfaceObject) {
|
||||
$interfaceFQN = '';
|
||||
foreach ($interfaceObject->parts as $interface) {
|
||||
$interfaceFQN .= "\\$interface";
|
||||
}
|
||||
$this->interfaces[] = ltrim($interfaceFQN, "\\");
|
||||
}
|
||||
}
|
||||
if ($node->getDocComment() !== null) {
|
||||
$docBlock = DocBlockFactory::createInstance()->create($node->getDocComment()->getText());
|
||||
/** @var PropertyRead[] $properties */
|
||||
$properties = array_merge(
|
||||
$docBlock->getTagsByName('property-read'),
|
||||
$docBlock->getTagsByName('property')
|
||||
);
|
||||
foreach ($properties as $property) {
|
||||
$propertyName = $property->getVariableName();
|
||||
assert($propertyName !== '', "@property name is empty in class $this->name");
|
||||
$newProperty = new PHPProperty($this->name);
|
||||
$newProperty->is_static = false;
|
||||
$newProperty->access = 'public';
|
||||
$newProperty->name = $propertyName;
|
||||
$newProperty->parentName = $this->name;
|
||||
$newProperty->typesFromSignature = self::convertParsedTypeToArray($property->getType());
|
||||
assert(
|
||||
!array_key_exists($propertyName, $this->properties),
|
||||
"Property '$propertyName' is already declared in class '$this->name'"
|
||||
);
|
||||
$this->properties[$propertyName] = $newProperty;
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function readMutedProblems($jsonData) {}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
namespace StubTests\Model;
|
||||
|
||||
use PhpParser\Node\Stmt\EnumCase;
|
||||
|
||||
class PHPEnumCase extends PHPConst
|
||||
{
|
||||
/**
|
||||
* @param \ReflectionEnumUnitCase $reflectionObject
|
||||
* @return static
|
||||
*/
|
||||
public function readObjectFromReflection($reflectionObject)
|
||||
{
|
||||
$this->name = $reflectionObject->name;
|
||||
$this->value = $reflectionObject->getValue();
|
||||
if ($reflectionObject->isPrivate()) {
|
||||
$this->visibility = 'private';
|
||||
} elseif ($reflectionObject->isProtected()) {
|
||||
$this->visibility = 'protected';
|
||||
} else {
|
||||
$this->visibility = 'public';
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EnumCase $node
|
||||
* @return $this|PHPEnumCase
|
||||
*/
|
||||
public function readObjectFromStubNode($node)
|
||||
{
|
||||
$this->name = $this->getConstantFQN($node, $node->name->name);
|
||||
//$this->value = $this->getConstValue($node);
|
||||
//$this->collectTags($node);
|
||||
$parentNode = $node->getAttribute('parent');
|
||||
if (property_exists($parentNode, 'attrGroups')) {
|
||||
$this->availableVersionsRangeFromAttribute = self::findAvailableVersionsRangeFromAttribute($parentNode->attrGroups);
|
||||
}
|
||||
$this->parentName = self::getFQN($parentNode->namespacedName);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function readMutedProblems($jsonData) {}
|
||||
}
|
|
@ -10,7 +10,7 @@ use RuntimeException;
|
|||
|
||||
class PhpVersions implements ArrayAccess, IteratorAggregate
|
||||
{
|
||||
private static $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2];
|
||||
private static $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3];
|
||||
|
||||
public static function getLatest()
|
||||
{
|
||||
|
|
|
@ -28,6 +28,11 @@ class StubsContainer
|
|||
*/
|
||||
private $interfaces = [];
|
||||
|
||||
/**
|
||||
* @var PHPEnum[]
|
||||
*/
|
||||
private $enums = [];
|
||||
|
||||
/**
|
||||
* @return PHPConst[]
|
||||
*/
|
||||
|
@ -188,6 +193,38 @@ class StubsContainer
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string|null $sourceFilePath
|
||||
* @param bool $shouldSuitCurrentPhpVersion
|
||||
* @return PHPEnum|null
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function getEnum($name, $sourceFilePath = null, $shouldSuitCurrentPhpVersion = true)
|
||||
{
|
||||
$enums = array_filter($this->enums, function (PHPEnum $enum) use ($shouldSuitCurrentPhpVersion, $name) {
|
||||
return $enum->name === $name &&
|
||||
(!$shouldSuitCurrentPhpVersion || BasePHPElement::entitySuitsCurrentPhpVersion($enum));
|
||||
});
|
||||
if (count($enums) === 1) {
|
||||
return array_pop($enums);
|
||||
}
|
||||
|
||||
if ($sourceFilePath !== null) {
|
||||
$enums = array_filter($enums, function (PHPEnum $enum) use ($shouldSuitCurrentPhpVersion, $sourceFilePath) {
|
||||
return $enum->sourceFilePath === $sourceFilePath &&
|
||||
(!$shouldSuitCurrentPhpVersion || BasePHPElement::entitySuitsCurrentPhpVersion($enum));
|
||||
});
|
||||
}
|
||||
if (count($enums) > 1) {
|
||||
throw new RuntimeException("Multiple enums with name $name found");
|
||||
}
|
||||
if (!empty($enums)) {
|
||||
return array_pop($enums);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PHPClass[]
|
||||
*/
|
||||
|
@ -255,6 +292,14 @@ class StubsContainer
|
|||
return $this->interfaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PHPEnum[]
|
||||
*/
|
||||
public function getEnums()
|
||||
{
|
||||
return $this->enums;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PHPInterface[]
|
||||
*/
|
||||
|
@ -281,4 +326,21 @@ class StubsContainer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addEnum(PHPEnum $enum)
|
||||
{
|
||||
if (isset($enum->name)) {
|
||||
if (array_key_exists($enum->name, $this->enums)) {
|
||||
$amount = count(array_filter(
|
||||
$this->enums,
|
||||
function (PHPEnum $nextEnum) use ($enum) {
|
||||
return $nextEnum->name === $enum->name;
|
||||
}
|
||||
));
|
||||
$this->enums[$enum->name . '_duplicated_' . $amount] = $enum;
|
||||
} else {
|
||||
$this->enums[$enum->name] = $enum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use ReflectionFunction;
|
|||
use StubTests\Model\CommonUtils;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPDefineConstant;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\StubsContainer;
|
||||
|
@ -44,9 +45,15 @@ class PHPReflectionParser
|
|||
foreach (get_declared_classes() as $clazz) {
|
||||
$reflectionClass = new ReflectionClass($clazz);
|
||||
if ($reflectionClass->isInternal()) {
|
||||
$class = (new PHPClass())->readObjectFromReflection($reflectionClass);
|
||||
$class->readMutedProblems($jsonData->classes);
|
||||
$stubs->addClass($class);
|
||||
if (method_exists($reflectionClass, 'isEnum') && $reflectionClass->isEnum()) {
|
||||
$enum = (new PHPEnum())->readObjectFromReflection($reflectionClass);
|
||||
$enum->readMutedProblems($jsonData->enums);
|
||||
$stubs->addEnum($enum);
|
||||
} else {
|
||||
$class = (new PHPClass())->readObjectFromReflection($reflectionClass);
|
||||
$class->readMutedProblems($jsonData->classes);
|
||||
$stubs->addClass($class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,10 @@ class ParserUtils
|
|||
*/
|
||||
private static function getSinceVersionsFromParentClass(PHPMethod|PHPConst $element): array
|
||||
{
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
if ($parentClass === null) {
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
}
|
||||
if ($parentClass === null) {
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
}
|
||||
|
@ -137,7 +140,10 @@ class ParserUtils
|
|||
*/
|
||||
public static function getLatestAvailableVersionsFromParentClass(PHPMethod|PHPConst $element): array
|
||||
{
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
if ($parentClass === null) {
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
}
|
||||
if ($parentClass === null) {
|
||||
$parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($element->parentName, shouldSuitCurrentPhpVersion: false);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ use PhpParser\Node;
|
|||
use PhpParser\Node\Const_;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\Enum_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PhpParser\Node\Stmt\Interface_;
|
||||
|
@ -17,6 +18,8 @@ use StubTests\Model\CommonUtils;
|
|||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPConst;
|
||||
use StubTests\Model\PHPDefineConstant;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPEnumCase;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
|
@ -43,6 +46,15 @@ class ASTVisitor extends NodeVisitorAbstract
|
|||
$function->stubBelongsToCore = true;
|
||||
}
|
||||
$this->stubs->addFunction($function);
|
||||
} elseif ($node instanceof Node\Stmt\EnumCase) {
|
||||
$constant = (new PHPEnumCase())->readObjectFromStubNode($node);
|
||||
$constant->sourceFilePath = $this->sourceFilePath;
|
||||
if ($this->isStubCore) {
|
||||
$constant->stubBelongsToCore = true;
|
||||
}
|
||||
if ($this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false)->addEnumCase($constant);
|
||||
}
|
||||
} elseif ($node instanceof Const_) {
|
||||
$constant = (new PHPConst())->readObjectFromStubNode($node);
|
||||
$constant->sourceFilePath = $this->sourceFilePath;
|
||||
|
@ -51,6 +63,8 @@ class ASTVisitor extends NodeVisitorAbstract
|
|||
}
|
||||
if ($constant->parentName === null) {
|
||||
$this->stubs->addConstant($constant);
|
||||
} elseif ($this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false)->addConstant($constant);
|
||||
} elseif ($this->stubs->getClass($constant->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getClass($constant->parentName, $this->sourceFilePath, false)->addConstant($constant);
|
||||
} elseif ($this->stubs->getInterface($constant->parentName, $this->sourceFilePath, false) !== null) {
|
||||
|
@ -71,7 +85,10 @@ class ASTVisitor extends NodeVisitorAbstract
|
|||
if ($this->isStubCore) {
|
||||
$method->stubBelongsToCore = true;
|
||||
}
|
||||
if ($this->stubs->getClass($method->parentName, $this->sourceFilePath, false) !== null) {
|
||||
if ($this->stubs->getEnum($method->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getEnum($method->parentName, $this->sourceFilePath, false)->addMethod($method);
|
||||
}
|
||||
elseif ($this->stubs->getClass($method->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getClass($method->parentName, $this->sourceFilePath, false)->addMethod($method);
|
||||
} elseif ($this->stubs->getInterface($method->parentName, $this->sourceFilePath, false) !== null) {
|
||||
$this->stubs->getInterface($method->parentName, $this->sourceFilePath, false)->addMethod($method);
|
||||
|
@ -90,6 +107,13 @@ class ASTVisitor extends NodeVisitorAbstract
|
|||
$class->stubBelongsToCore = true;
|
||||
}
|
||||
$this->stubs->addClass($class);
|
||||
} elseif ($node instanceof Enum_) {
|
||||
$enum = (new PHPEnum())->readObjectFromStubNode($node);
|
||||
$enum->sourceFilePath = $this->sourceFilePath;
|
||||
if ($this->isStubCore) {
|
||||
$enum->stubBelongsToCore = true;
|
||||
}
|
||||
$this->stubs->addEnum($enum);
|
||||
} elseif ($node instanceof Node\Stmt\Property) {
|
||||
$property = (new PHPProperty())->readObjectFromStubNode($node);
|
||||
$property->sourceFilePath = $this->sourceFilePath;
|
||||
|
|
|
@ -7,6 +7,7 @@ use PHPUnit\Framework\Exception;
|
|||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPConst;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
|
@ -62,7 +63,9 @@ class StubsConstantsAndParametersValuesTest extends AbstractBaseStubsTestCase
|
|||
*/
|
||||
public function testMethodsDefaultParametersValue(PHPClass|PHPInterface $class, PHPMethod $method, PHPParameter $parameter)
|
||||
{
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class->name)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($method->name);
|
||||
} else {
|
||||
$phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($method->name);
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace StubTests;
|
|||
use PHPUnit\Framework\Exception;
|
||||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPEnum;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
|
@ -85,7 +86,9 @@ class StubsTypeHintsTest extends AbstractBaseStubsTestCase
|
|||
public function testMethodsReturnTypeHints(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$functionName = $method->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
if ($class instanceof PHPEnum) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class->name)->getMethod($method->name);
|
||||
} elseif ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($functionName);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($functionName);
|
||||
|
|
|
@ -47,7 +47,8 @@ class ReflectionMethodsProvider
|
|||
public static function classMethodsWithoutTentitiveReturnTypeProvider(): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getEnums();
|
||||
foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
|
||||
foreach (EntitiesFilter::getFiltered(
|
||||
$class->methods,
|
||||
|
@ -64,7 +65,8 @@ class ReflectionMethodsProvider
|
|||
public static function classMethodsWithTentitiveReturnTypeProvider(): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getEnums();
|
||||
foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
|
||||
foreach (EntitiesFilter::getFiltered(
|
||||
$class->methods,
|
||||
|
@ -81,7 +83,8 @@ class ReflectionMethodsProvider
|
|||
private static function yieldFilteredMethods(int ...$problemTypes): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getEnums();
|
||||
foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
|
||||
foreach (EntitiesFilter::getFiltered($class->methods, null, ...$problemTypes) as $method) {
|
||||
yield "Method $class->name::$method->name" => [$class, $method];
|
||||
|
|
|
@ -1052,6 +1052,17 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hash_pbkdf2",
|
||||
"problems": [
|
||||
{
|
||||
"description": "parameter mismatch",
|
||||
"versions": [
|
||||
8.2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"classes": [
|
||||
|
@ -1153,7 +1164,8 @@
|
|||
"versions": [
|
||||
8.0,
|
||||
8.1,
|
||||
8.2
|
||||
8.2,
|
||||
8.3
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -3214,7 +3226,8 @@
|
|||
"versions": [
|
||||
8.0,
|
||||
8.1,
|
||||
8.2
|
||||
8.2,
|
||||
8.3
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -3241,7 +3254,8 @@
|
|||
"versions": [
|
||||
8.0,
|
||||
8.1,
|
||||
8.2
|
||||
8.2,
|
||||
8.3
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -3331,5 +3345,6 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"enums": []
|
||||
}
|
||||
|
|
|
@ -521,13 +521,14 @@ function xml_parser_set_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"],
|
|||
* @param int $option Which option to fetch. <b>XML_OPTION_CASE_FOLDING</b>
|
||||
* and <b>XML_OPTION_TARGET_ENCODING</b> are available.
|
||||
* See <b>xml_parser_set_option</b> for their description.
|
||||
* @return string|int This function returns <b>FALSE</b> if <i>parser</i> does
|
||||
* @return string|int|bool This function returns <b>FALSE</b> if <i>parser</i> does
|
||||
* not refer to a valid parser or if <i>option</i> isn't
|
||||
* valid (generates also a <b>E_WARNING</b>).
|
||||
* Else the option's value is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
function xml_parser_get_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option): string|int {}
|
||||
#[LanguageLevelTypeAware(["8.3" => "string|int|bool"], default: "string|int")]
|
||||
function xml_parser_get_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option) {}
|
||||
|
||||
define('XML_ERROR_NONE', 0);
|
||||
define('XML_ERROR_NO_MEMORY', 1);
|
||||
|
|
Loading…
Reference in New Issue