diff --git a/generated/Exceptions/RnpException.php b/generated/Exceptions/RnpException.php new file mode 100644 index 00000000..6cf8fb81 --- /dev/null +++ b/generated/Exceptions/RnpException.php @@ -0,0 +1,11 @@ + - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param resource $parser A reference to the XML parser to set up notation declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters: - * - * handler - * XMLParserparser - * stringnotation_name - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * Currently this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. - * @throws XmlException - * - */ -function xml_set_notation_decl_handler($parser, callable $handler): void -{ - error_clear_last(); - $safeResult = \xml_set_notation_decl_handler($parser, $handler); - if ($safeResult === false) { - throw XmlException::createFromPhpError(); - } -} - - -/** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param resource $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. - * @throws XmlException - * - */ -function xml_set_object($parser, object $object): void -{ - error_clear_last(); - $safeResult = \xml_set_object($parser, $object); - if ($safeResult === false) { - throw XmlException::createFromPhpError(); - } -} - - -/** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * <?target - * data?> - * - * - * You can put PHP code into such a tag, but be aware of one limitation: in - * an XML PI, the PI end tag (?>) can not be quoted, - * so this character sequence should not appear in the PHP code you embed - * with PIs in XML documents.If it does, the rest of the PHP code, as well - * as the "real" PI end tag, will be treated as character data. - * - * @param resource $parser A reference to the XML parser to set up processing instruction (PI) handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters: - * - * handler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * target - * - * - * The second parameter, target, contains the PI - * target. - * - * - * - * - * data - * - * - * The third parameter, data, contains the PI - * data. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. - * @throws XmlException - * - */ -function xml_set_processing_instruction_handler($parser, callable $handler): void -{ - error_clear_last(); - $safeResult = \xml_set_processing_instruction_handler($parser, $handler); - if ($safeResult === false) { - throw XmlException::createFromPhpError(); - } -} - - -/** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param resource $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * stringuri - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. - * @throws XmlException - * - */ -function xml_set_start_namespace_decl_handler($parser, callable $handler): void -{ - error_clear_last(); - $safeResult = \xml_set_start_namespace_decl_handler($parser, $handler); - if ($safeResult === false) { - throw XmlException::createFromPhpError(); - } -} - - -/** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param resource $parser A reference to the XML parser to set up unparsed entity declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept six - * parameters: - * - * handler - * XMLParserparser - * stringentity_name - * stringbase - * stringsystem_id - * stringpublic_id - * stringnotation_name - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the - * handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * + * Whether to skip values consisting of whitespace characters. * * - * notation_name * + * XML_OPTION_TARGET_ENCODING + * string * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). + * Sets which target encoding to + * use in this XML parser.By default, it is set to the same as the + * source encoding used by xml_parser_create. + * Supported target encodings are ISO-8859-1, + * US-ASCII and UTF-8. * * * * * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param mixed $value The option's new value. * @throws XmlException * */ -function xml_set_unparsed_entity_decl_handler($parser, callable $handler): void +function xml_parser_set_option($parser, int $option, $value): void { error_clear_last(); - $safeResult = \xml_set_unparsed_entity_decl_handler($parser, $handler); + $safeResult = \xml_parser_set_option($parser, $option, $value); if ($safeResult === false) { throw XmlException::createFromPhpError(); } diff --git a/generated/zlib.php b/generated/zlib.php index daa555ab..b83a29d0 100644 --- a/generated/zlib.php +++ b/generated/zlib.php @@ -403,28 +403,6 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) } -/** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The number of uncompressed characters read from gz - * and passed through to the input. - * @throws ZlibException - * - */ -function gzpassthru($stream): int -{ - error_clear_last(); - $safeResult = \gzpassthru($stream); - if ($safeResult === false) { - throw ZlibException::createFromPhpError(); - } - return $safeResult; -} - - /** * gzread reads up to length bytes * from the given gz-file pointer. Reading stops when @@ -542,25 +520,6 @@ function inflate_get_read_len($context): int } -/** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * - * @param resource $context - * @return int Returns decompression status. - * @throws ZlibException - * - */ -function inflate_get_status($context): int -{ - error_clear_last(); - $safeResult = \inflate_get_status($context); - if ($safeResult === false) { - throw ZlibException::createFromPhpError(); - } - return $safeResult; -} - - /** * Incrementally inflates encoded data in the specified context. * diff --git a/rector-migrate.php b/rector-migrate.php index 8bd9d7bd..da0b89c3 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -22,7 +22,6 @@ 'apcu_sma_info' => 'Safe\apcu_sma_info', 'apc_fetch' => 'Safe\apc_fetch', 'array_walk_recursive' => 'Safe\array_walk_recursive', - 'assert_options' => 'Safe\assert_options', 'base64_decode' => 'Safe\base64_decode', 'bindtextdomain' => 'Safe\bindtextdomain', 'bzclose' => 'Safe\bzclose', @@ -39,7 +38,6 @@ 'class_parents' => 'Safe\class_parents', 'class_uses' => 'Safe\class_uses', 'cli_set_process_title' => 'Safe\cli_set_process_title', - 'closelog' => 'Safe\closelog', 'com_create_guid' => 'Safe\com_create_guid', 'com_event_sink' => 'Safe\com_event_sink', 'com_load_typelib' => 'Safe\com_load_typelib', @@ -107,10 +105,8 @@ 'curl_getinfo' => 'Safe\curl_getinfo', 'curl_init' => 'Safe\curl_init', 'curl_multi_info_read' => 'Safe\curl_multi_info_read', - 'curl_multi_init' => 'Safe\curl_multi_init', 'curl_multi_setopt' => 'Safe\curl_multi_setopt', 'curl_setopt' => 'Safe\curl_setopt', - 'curl_share_errno' => 'Safe\curl_share_errno', 'curl_share_setopt' => 'Safe\curl_share_setopt', 'curl_unescape' => 'Safe\curl_unescape', 'curl_upkeep' => 'Safe\curl_upkeep', @@ -129,6 +125,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 +199,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', @@ -221,6 +219,7 @@ 'ftp_login' => 'Safe\ftp_login', 'ftp_mkdir' => 'Safe\ftp_mkdir', 'ftp_mlsd' => 'Safe\ftp_mlsd', + 'ftp_nb_get' => 'Safe\ftp_nb_get', 'ftp_nb_put' => 'Safe\ftp_nb_put', 'ftp_nlist' => 'Safe\ftp_nlist', 'ftp_pasv' => 'Safe\ftp_pasv', @@ -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', @@ -747,8 +737,6 @@ 'pg_socket' => 'Safe\pg_socket', 'pg_trace' => 'Safe\pg_trace', 'pg_update' => 'Safe\pg_update', - 'phpcredits' => 'Safe\phpcredits', - 'phpinfo' => 'Safe\phpinfo', 'php_sapi_name' => 'Safe\php_sapi_name', 'png2wbmp' => 'Safe\png2wbmp', 'posix_access' => 'Safe\posix_access', @@ -780,7 +768,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 +861,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', @@ -919,7 +933,6 @@ 'shm_put_var' => 'Safe\shm_put_var', 'shm_remove' => 'Safe\shm_remove', 'shm_remove_var' => 'Safe\shm_remove_var', - 'shuffle' => 'Safe\shuffle', 'simplexml_import_dom' => 'Safe\simplexml_import_dom', 'simplexml_load_file' => 'Safe\simplexml_load_file', 'simplexml_load_string' => 'Safe\simplexml_load_string', @@ -960,7 +973,6 @@ 'sodium_crypto_auth_verify' => 'Safe\sodium_crypto_auth_verify', 'sodium_crypto_box_open' => 'Safe\sodium_crypto_box_open', 'sodium_crypto_box_seal_open' => 'Safe\sodium_crypto_box_seal_open', - 'sodium_crypto_generichash_update' => 'Safe\sodium_crypto_generichash_update', 'sodium_crypto_secretbox_open' => 'Safe\sodium_crypto_secretbox_open', 'sodium_crypto_sign_open' => 'Safe\sodium_crypto_sign_open', 'sodium_crypto_sign_verify_detached' => 'Safe\sodium_crypto_sign_verify_detached', @@ -1044,7 +1056,6 @@ 'swoole_event_del' => 'Safe\swoole_event_del', 'swoole_event_write' => 'Safe\swoole_event_write', 'symlink' => 'Safe\symlink', - 'syslog' => 'Safe\syslog', 'system' => 'Safe\system', 'tempnam' => 'Safe\tempnam', 'timezone_name_from_abbr' => 'Safe\timezone_name_from_abbr', @@ -1071,16 +1082,7 @@ 'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary', 'xmlrpc_set_type' => 'Safe\xmlrpc_set_type', 'xml_parser_free' => 'Safe\xml_parser_free', - 'xml_set_character_data_handler' => 'Safe\xml_set_character_data_handler', - 'xml_set_default_handler' => 'Safe\xml_set_default_handler', - 'xml_set_element_handler' => 'Safe\xml_set_element_handler', - 'xml_set_end_namespace_decl_handler' => 'Safe\xml_set_end_namespace_decl_handler', - 'xml_set_external_entity_ref_handler' => 'Safe\xml_set_external_entity_ref_handler', - 'xml_set_notation_decl_handler' => 'Safe\xml_set_notation_decl_handler', - 'xml_set_object' => 'Safe\xml_set_object', - 'xml_set_processing_instruction_handler' => 'Safe\xml_set_processing_instruction_handler', - 'xml_set_start_namespace_decl_handler' => 'Safe\xml_set_start_namespace_decl_handler', - 'xml_set_unparsed_entity_decl_handler' => 'Safe\xml_set_unparsed_entity_decl_handler', + 'xml_parser_set_option' => 'Safe\xml_parser_set_option', 'yaml_parse' => 'Safe\yaml_parse', 'yaml_parse_file' => 'Safe\yaml_parse_file', 'yaml_parse_url' => 'Safe\yaml_parse_url',