diff --git a/composer.json b/composer.json index e85a6593..59e67ae3 100644 --- a/composer.json +++ b/composer.json @@ -11,17 +11,7 @@ "generated/Exceptions/" ], "files": [ - "deprecated/apc.php", - "deprecated/array.php", - "deprecated/datetime.php", - "deprecated/libevent.php", - "deprecated/misc.php", - "deprecated/password.php", - "deprecated/mssql.php", - "deprecated/stats.php", - "deprecated/strings.php", "lib/special_cases.php", - "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", "generated/array.php", @@ -43,7 +33,6 @@ "generated/ftp.php", "generated/funchand.php", "generated/gettext.php", - "generated/gmp.php", "generated/gnupg.php", "generated/hash.php", "generated/ibase.php", @@ -73,6 +62,7 @@ "generated/ps.php", "generated/pspell.php", "generated/readline.php", + "generated/rnp.php", "generated/rpminfo.php", "generated/rrd.php", "generated/sem.php", @@ -102,7 +92,7 @@ ] }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { "phpstan/phpstan": "^1.5", diff --git a/deprecated/.gitkeep b/deprecated/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/Exceptions/LibeventException.php b/deprecated/Exceptions/LibeventException.php deleted file mode 100644 index a6c541a5..00000000 --- a/deprecated/Exceptions/LibeventException.php +++ /dev/null @@ -1,11 +0,0 @@ - - * - * - * @param int $length If length is given and is positive, the string - * returned will contain at most length characters - * beginning from start (depending on the length of - * string). - * - * If length is given and is negative, then that many - * characters will be omitted from the end of string - * (after the start position has been calculated when a - * start is negative). If - * start denotes the position of this truncation or - * beyond, FALSE will be returned. - * - * If length is given and is 0, - * FALSE or NULL, an empty string will be returned. - * - * If length is omitted, the substring starting from - * start until the end of the string will be - * returned. - * @return string Returns the extracted part of string;, or - * an empty string. - * @throws StringsException - * @deprecated The Safe version of this function is no longer needed in PHP 8.0+ - * - */ -function substr(string $string, int $start, int $length = null): string -{ - error_clear_last(); - if ($length !== null) { - $result = \substr($string, $start, $length); - } else { - $result = \substr($string, $start); - } - if ($result === false) { - throw StringsException::createFromPhpError(); - } - return $result; -} - -/** - * Operates as sprintf but accepts an array of - * arguments, rather than a variable number of arguments. - * - * @param string $format The format string is composed of zero or more directives: - * ordinary characters (excluding %) that are - * copied directly to the result and conversion - * specifications, each of which results in fetching its - * own parameter. - * - * A conversion specification follows this prototype: - * %[argnum$][flags][width][.precision]specifier. - * - * An integer followed by a dollar sign $, - * to specify which number argument to treat in the conversion. - * - * - * Flags - * - * - * - * Flag - * Description - * - * - * - * - * - - * - * Left-justify within the given field width; - * Right justification is the default - * - * - * - * + - * - * Prefix positive numbers with a plus sign - * +; Default only negative - * are prefixed with a negative sign. - * - * - * - * (space) - * - * Pads the result with spaces. - * This is the default. - * - * - * - * 0 - * - * Only left-pads numbers with zeros. - * With s specifiers this can - * also right-pad with zeros. - * - * - * - * '(char) - * - * Pads the result with the character (char). - * - * - * - * - * - * - * An integer that says how many characters (minimum) - * this conversion should result in. - * - * A period . followed by an integer - * who's meaning depends on the specifier: - * - * - * - * For e, E, - * f and F - * specifiers: this is the number of digits to be printed - * after the decimal point (by default, this is 6). - * - * - * - * - * For g and G - * specifiers: this is the maximum number of significant - * digits to be printed. - * - * - * - * - * For s specifier: it acts as a cutoff point, - * setting a maximum character limit to the string. - * - * - * - * - * - * If the period is specified without an explicit value for precision, - * 0 is assumed. - * - * - * - * - * Specifiers - * - * - * - * Specifier - * Description - * - * - * - * - * % - * - * A literal percent character. No argument is required. - * - * - * - * b - * - * The argument is treated as an integer and presented - * as a binary number. - * - * - * - * c - * - * The argument is treated as an integer and presented - * as the character with that ASCII. - * - * - * - * d - * - * The argument is treated as an integer and presented - * as a (signed) decimal number. - * - * - * - * e - * - * The argument is treated as scientific notation (e.g. 1.2e+2). - * The precision specifier stands for the number of digits after the - * decimal point since PHP 5.2.1. In earlier versions, it was taken as - * number of significant digits (one less). - * - * - * - * E - * - * Like the e specifier but uses - * uppercase letter (e.g. 1.2E+2). - * - * - * - * f - * - * The argument is treated as a float and presented - * as a floating-point number (locale aware). - * - * - * - * F - * - * The argument is treated as a float and presented - * as a floating-point number (non-locale aware). - * Available as of PHP 5.0.3. - * - * - * - * g - * - * - * General format. - * - * - * Let P equal the precision if nonzero, 6 if the precision is omitted, - * or 1 if the precision is zero. - * Then, if a conversion with style E would have an exponent of X: - * - * - * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). - * Otherwise, the conversion is with style e and precision P − 1. - * - * - * - * - * G - * - * Like the g specifier but uses - * E and f. - * - * - * - * o - * - * The argument is treated as an integer and presented - * as an octal number. - * - * - * - * s - * - * The argument is treated and presented as a string. - * - * - * - * u - * - * The argument is treated as an integer and presented - * as an unsigned decimal number. - * - * - * - * x - * - * The argument is treated as an integer and presented - * as a hexadecimal number (with lowercase letters). - * - * - * - * X - * - * The argument is treated as an integer and presented - * as a hexadecimal number (with uppercase letters). - * - * - * - * - * - * - * General format. - * - * Let P equal the precision if nonzero, 6 if the precision is omitted, - * or 1 if the precision is zero. - * Then, if a conversion with style E would have an exponent of X: - * - * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). - * Otherwise, the conversion is with style e and precision P − 1. - * - * The c type specifier ignores padding and width - * - * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results - * - * Variables will be co-erced to a suitable type for the specifier: - * - * Type Handling - * - * - * - * Type - * Specifiers - * - * - * - * - * string - * s - * - * - * integer - * - * d, - * u, - * c, - * o, - * x, - * X, - * b - * - * - * - * double - * - * g, - * G, - * e, - * E, - * f, - * F - * - * - * - * - * - * @param array $args - * @return string Return array values as a formatted string according to - * format. - * @throws StringsException - * @deprecated The Safe version of this function is no longer needed in PHP 8.0+ - */ -function vsprintf(string $format, array $args): string -{ - error_clear_last(); - $result = \vsprintf($format, $args); - if ($result === false) { - throw StringsException::createFromPhpError(); - } - return $result; -} diff --git a/generated/Exceptions/GmpException.php b/generated/Exceptions/GmpException.php deleted file mode 100644 index d2c91da9..00000000 --- a/generated/Exceptions/GmpException.php +++ /dev/null @@ -1,11 +0,0 @@ - 'Safe\curl_share_setopt', 'curl_unescape' => 'Safe\curl_unescape', 'curl_upkeep' => 'Safe\curl_upkeep', - 'date' => 'Safe\date', - 'date_parse' => 'Safe\date_parse', 'date_parse_from_format' => 'Safe\date_parse_from_format', 'date_sunrise' => 'Safe\date_sunrise', 'date_sunset' => 'Safe\date_sunset', @@ -129,6 +127,7 @@ 'db2_free_result' => 'Safe\db2_free_result', 'db2_free_stmt' => 'Safe\db2_free_stmt', 'db2_get_option' => 'Safe\db2_get_option', + 'db2_num_rows' => 'Safe\db2_num_rows', 'db2_pclose' => 'Safe\db2_pclose', 'db2_rollback' => 'Safe\db2_rollback', 'db2_server_info' => 'Safe\db2_server_info', @@ -202,6 +201,7 @@ 'finfo_open' => 'Safe\finfo_open', 'flock' => 'Safe\flock', 'fopen' => 'Safe\fopen', + 'fpm_get_status' => 'Safe\fpm_get_status', 'fputcsv' => 'Safe\fputcsv', 'fread' => 'Safe\fread', 'fsockopen' => 'Safe\fsockopen', @@ -253,7 +253,6 @@ 'get_meta_tags' => 'Safe\get_meta_tags', 'glob' => 'Safe\glob', 'gmmktime' => 'Safe\gmmktime', - 'gmp_random_seed' => 'Safe\gmp_random_seed', 'gmstrftime' => 'Safe\gmstrftime', 'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey', 'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey', @@ -274,12 +273,10 @@ 'gzgetss' => 'Safe\gzgetss', 'gzinflate' => 'Safe\gzinflate', 'gzopen' => 'Safe\gzopen', - 'gzpassthru' => 'Safe\gzpassthru', 'gzread' => 'Safe\gzread', 'gzrewind' => 'Safe\gzrewind', 'gzuncompress' => 'Safe\gzuncompress', 'gzwrite' => 'Safe\gzwrite', - 'hash_hkdf' => 'Safe\hash_hkdf', 'hash_update_file' => 'Safe\hash_update_file', 'header_register_callback' => 'Safe\header_register_callback', 'hex2bin' => 'Safe\hex2bin', @@ -389,8 +386,6 @@ 'imagesettile' => 'Safe\imagesettile', 'imagestring' => 'Safe\imagestring', 'imagestringup' => 'Safe\imagestringup', - 'imagesx' => 'Safe\imagesx', - 'imagesy' => 'Safe\imagesy', 'imagetruecolortopalette' => 'Safe\imagetruecolortopalette', 'imagettfbbox' => 'Safe\imagettfbbox', 'imagettftext' => 'Safe\imagettftext', @@ -423,7 +418,6 @@ 'imap_listscan' => 'Safe\imap_listscan', 'imap_lsub' => 'Safe\imap_lsub', 'imap_mail' => 'Safe\imap_mail', - 'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo', 'imap_mail_compose' => 'Safe\imap_mail_compose', 'imap_mail_copy' => 'Safe\imap_mail_copy', 'imap_mail_move' => 'Safe\imap_mail_move', @@ -449,7 +443,6 @@ 'inet_ntop' => 'Safe\inet_ntop', 'inflate_add' => 'Safe\inflate_add', 'inflate_get_read_len' => 'Safe\inflate_get_read_len', - 'inflate_get_status' => 'Safe\inflate_get_status', 'inflate_init' => 'Safe\inflate_init', 'ini_get' => 'Safe\ini_get', 'ini_set' => 'Safe\ini_set', @@ -477,7 +470,6 @@ 'ldap_first_attribute' => 'Safe\ldap_first_attribute', 'ldap_first_entry' => 'Safe\ldap_first_entry', 'ldap_free_result' => 'Safe\ldap_free_result', - 'ldap_get_attributes' => 'Safe\ldap_get_attributes', 'ldap_get_dn' => 'Safe\ldap_get_dn', 'ldap_get_entries' => 'Safe\ldap_get_entries', 'ldap_get_option' => 'Safe\ldap_get_option', @@ -509,7 +501,6 @@ 'mb_chr' => 'Safe\mb_chr', 'mb_convert_encoding' => 'Safe\mb_convert_encoding', 'mb_detect_order' => 'Safe\mb_detect_order', - 'mb_encoding_aliases' => 'Safe\mb_encoding_aliases', 'mb_eregi_replace' => 'Safe\mb_eregi_replace', 'mb_ereg_replace' => 'Safe\mb_ereg_replace', 'mb_ereg_replace_callback' => 'Safe\mb_ereg_replace_callback', @@ -696,7 +687,6 @@ 'openssl_x509_read' => 'Safe\openssl_x509_read', 'output_add_rewrite_var' => 'Safe\output_add_rewrite_var', 'output_reset_rewrite_vars' => 'Safe\output_reset_rewrite_vars', - 'pack' => 'Safe\pack', 'parse_ini_file' => 'Safe\parse_ini_file', 'parse_ini_string' => 'Safe\parse_ini_string', 'parse_url' => 'Safe\parse_url', @@ -780,7 +770,6 @@ 'pspell_add_to_personal' => 'Safe\pspell_add_to_personal', 'pspell_add_to_session' => 'Safe\pspell_add_to_session', 'pspell_clear_session' => 'Safe\pspell_clear_session', - 'pspell_config_create' => 'Safe\pspell_config_create', 'pspell_config_data_dir' => 'Safe\pspell_config_data_dir', 'pspell_config_dict_dir' => 'Safe\pspell_config_dict_dir', 'pspell_config_ignore' => 'Safe\pspell_config_ignore', @@ -874,6 +863,33 @@ 'rename' => 'Safe\rename', 'rewind' => 'Safe\rewind', 'rmdir' => 'Safe\rmdir', + 'rnp_decrypt' => 'Safe\rnp_decrypt', + 'rnp_dump_packets' => 'Safe\rnp_dump_packets', + 'rnp_dump_packets_to_json' => 'Safe\rnp_dump_packets_to_json', + 'rnp_ffi_create' => 'Safe\rnp_ffi_create', + 'rnp_ffi_set_pass_provider' => 'Safe\rnp_ffi_set_pass_provider', + 'rnp_import_keys' => 'Safe\rnp_import_keys', + 'rnp_import_signatures' => 'Safe\rnp_import_signatures', + 'rnp_key_export' => 'Safe\rnp_key_export', + 'rnp_key_export_autocrypt' => 'Safe\rnp_key_export_autocrypt', + 'rnp_key_export_revocation' => 'Safe\rnp_key_export_revocation', + 'rnp_key_get_info' => 'Safe\rnp_key_get_info', + 'rnp_key_remove' => 'Safe\rnp_key_remove', + 'rnp_key_revoke' => 'Safe\rnp_key_revoke', + 'rnp_list_keys' => 'Safe\rnp_list_keys', + 'rnp_load_keys' => 'Safe\rnp_load_keys', + 'rnp_load_keys_from_path' => 'Safe\rnp_load_keys_from_path', + 'rnp_locate_key' => 'Safe\rnp_locate_key', + 'rnp_op_encrypt' => 'Safe\rnp_op_encrypt', + 'rnp_op_generate_key' => 'Safe\rnp_op_generate_key', + 'rnp_op_sign' => 'Safe\rnp_op_sign', + 'rnp_op_sign_cleartext' => 'Safe\rnp_op_sign_cleartext', + 'rnp_op_sign_detached' => 'Safe\rnp_op_sign_detached', + 'rnp_op_verify' => 'Safe\rnp_op_verify', + 'rnp_op_verify_detached' => 'Safe\rnp_op_verify_detached', + 'rnp_save_keys' => 'Safe\rnp_save_keys', + 'rnp_save_keys_to_path' => 'Safe\rnp_save_keys_to_path', + 'rnp_supported_features' => 'Safe\rnp_supported_features', 'rpmaddtag' => 'Safe\rpmaddtag', 'rrd_create' => 'Safe\rrd_create', 'rrd_first' => 'Safe\rrd_first',