Skip to content

Add missing stubs for function aliases #5187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions ext/bz2/bz2.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,19 @@ function bzread($bz, int $length = 1024): string|false {}
/** @param resource $bz */
function bzwrite($bz, string $str, int $length = UNKNOWN): int|false {}

/**
* @param resource $bz
*/
/** @param resource $bz */
function bzflush($bz): bool {}

/**
* @param resource $bz
*/
/** @param resource $bz */
function bzclose($bz): bool {}

/**
* @param resource $bz
*/
/** @param resource $bz */
function bzerrno($bz): int {}

/**
* @param resource $bz
*/
/** @param resource $bz */
function bzerrstr($bz): string {}

/**
* @param resource $bz
*/
/** @param resource $bz */
function bzerror($bz): array {}

function bzcompress(string $source, int $blocksize = 4, int $workfactor = 0): string|int {}
Expand Down
3 changes: 3 additions & 0 deletions ext/ftp/ftp.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ function ftp_site($ftp, string $cmd): bool {}
/** @param resource $ftp */
function ftp_close($ftp): bool {}

/** @param resource $ftp */
function ftp_quit($ftp): bool {}

/** @param resource $ftp */
function ftp_set_option($ftp, int $option, $value): bool {}

Expand Down
2 changes: 2 additions & 0 deletions ext/ftp/ftp_arginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ ZEND_END_ARG_INFO()

#define arginfo_ftp_close arginfo_ftp_cdup

#define arginfo_ftp_quit arginfo_ftp_cdup

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_set_option, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
Expand Down
2 changes: 1 addition & 1 deletion ext/ftp/php_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static const zend_function_entry php_ftp_functions[] = {
PHP_FE(ftp_nb_continue, arginfo_ftp_nb_continue)
PHP_FE(ftp_nb_put, arginfo_ftp_nb_put)
PHP_FE(ftp_nb_fput, arginfo_ftp_nb_fput)
PHP_FALIAS(ftp_quit, ftp_close, arginfo_ftp_close)
PHP_FALIAS(ftp_quit, ftp_close, arginfo_ftp_quit)
PHP_FE_END
};

Expand Down
16 changes: 8 additions & 8 deletions ext/imap/php_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ static const zend_function_entry imap_functions[] = {
PHP_FE(imap_getsubscribed, arginfo_imap_getsubscribed)
PHP_FE(imap_getmailboxes, arginfo_imap_getmailboxes)

PHP_FALIAS(imap_header, imap_headerinfo, arginfo_imap_headerinfo)
PHP_FALIAS(imap_listmailbox, imap_list, arginfo_imap_list)
PHP_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_listscan)
PHP_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_lsub)
PHP_FALIAS(imap_fetchtext, imap_body, arginfo_imap_body)
PHP_FALIAS(imap_scan, imap_listscan, arginfo_imap_listscan)
PHP_FALIAS(imap_create, imap_createmailbox, arginfo_imap_createmailbox)
PHP_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_renamemailbox)
PHP_FALIAS(imap_header, imap_headerinfo, arginfo_imap_header)
PHP_FALIAS(imap_listmailbox, imap_list, arginfo_imap_listmailbox)
PHP_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_scanmailbox)
PHP_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_listsubscribed)
PHP_FALIAS(imap_fetchtext, imap_body, arginfo_imap_fetchtext)
PHP_FALIAS(imap_scan, imap_listscan, arginfo_imap_scan)
PHP_FALIAS(imap_create, imap_createmailbox, arginfo_imap_create)
PHP_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_rename)
PHP_FE_END
};
/* }}} */
Expand Down
80 changes: 37 additions & 43 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function imap_headers($stream_id): array|false {}
/** @param resource $stream_id */
function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {}

function imap_header($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {}

function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): \stdClass {}

function imap_rfc822_write_address(string $mailbox, string $host, string $personal): string|false {}
Expand All @@ -36,6 +38,9 @@ function imap_rfc822_parse_adrlist(string $address_string, string $default_host)
/** @param resource $stream_id */
function imap_body($stream_id, int $msg_no, int $options = 0): string|false {}

/** @param resource $stream_id */
function imap_fetchtext($stream_id, int $msg_no, int $options = 0): string|false {}

/**
* @param resource $stream_id
* @return \stdClass|false
Expand Down Expand Up @@ -86,51 +91,45 @@ function imap_check($stream_id): stdClass|false {}
/** @param resource $stream_id */
function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_scan($stream_id, string $ref, string $pattern, string $content): array|false {}

/** @param resource $stream_id */
function imap_scanmailbox($stream_id, string $ref, string $pattern, string $content): array|false {}

/** @param resource $stream_id */
function imap_mail_copy($stream_id, string $msglist, string $mailbox, int $options = 0): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_mail_move($stream_id, string $sequence, string $mailbox, int $options = 0): bool {}

function imap_mail_compose(array $envelope, array $body): string|false {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_createmailbox($stream_id, string $mailbox): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_create($stream_id, string $mailbox): bool {}

/** @param resource $stream_id */
function imap_renamemailbox($stream_id, string $old_name, string $new_name): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_rename($stream_id, string $old_name, string $new_name): bool {}

/** @param resource $stream_id */
function imap_deletemailbox($stream_id, string $mailbox): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_subscribe($stream_id, string $mailbox): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_unsubscribe($stream_id, string $mailbox): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_append($stream_id, string $folder, string $message, string $options = UNKNOWN, string $internal_date = UNKNOWN): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_ping($stream_id): bool {}

function imap_base64(string $text): string|false {}
Expand All @@ -150,25 +149,18 @@ function imap_utf8(string $mime_encoded_text): string {}
*/
function imap_status($stream_id, string $mailbox, int $options) {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_mailboxmsginfo($stream_id): \stdClass {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_setflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}

/** @param resource $stream_id */
function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN): array|false {}


/** @param resource $stream_id */
function imap_uid($stream_id, int $msg_no): int|false {}

Expand All @@ -178,9 +170,15 @@ function imap_msgno($stream_id, int $unique_msg_id): int|false {}
/** @param resource $stream_id */
function imap_list($stream_id, string $ref, string $pattern): array|false {}

/** @param resource $stream_id */
function imap_listmailbox($stream_id, string $ref, string $pattern): array|false {}

/** @param resource $stream_id */
function imap_lsub($stream_id, string $ref, string $pattern): array|false {}

/** @param resource $stream_id */
function imap_listsubscribed($stream_id, string $ref, string $pattern): array|false {}

/** @param resource $stream_id */
function imap_getsubscribed($stream_id, string $ref, string $pattern): array|false {}

Expand Down Expand Up @@ -223,14 +221,10 @@ function imap_get_quota($stream_id, string $qroot): array|false {}
/** @param resource $stream_id */
function imap_get_quotaroot($stream_id, string $mbox): array|false {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_set_quota($stream_id, string $qroot, int $mailbox_size): bool {}

/**
* @param resource $stream_id
*/
/** @param resource $stream_id */
function imap_setacl($stream_id, string $mailbox, string $id, string $rights): bool {}

/** @param resource $stream_id */
Expand Down
16 changes: 16 additions & 0 deletions ext/imap/php_imap_arginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdCl
ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_header arginfo_imap_headerinfo

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0)
ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0)
Expand All @@ -61,6 +63,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|M
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_fetchtext arginfo_imap_body

ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
Expand Down Expand Up @@ -120,6 +124,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRA
ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_scan arginfo_imap_listscan

#define arginfo_imap_scanmailbox arginfo_imap_listscan

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, msglist, IS_STRING, 0)
Expand All @@ -144,12 +152,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_createmailbox, 0, 2, _IS_BO
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_create arginfo_imap_createmailbox

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_renamemailbox, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, old_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, new_name, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_rename arginfo_imap_renamemailbox

#define arginfo_imap_deletemailbox arginfo_imap_createmailbox

#define arginfo_imap_subscribe arginfo_imap_createmailbox
Expand Down Expand Up @@ -224,8 +236,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MA
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_imap_listmailbox arginfo_imap_list

#define arginfo_imap_lsub arginfo_imap_list

#define arginfo_imap_listsubscribed arginfo_imap_list

#define arginfo_imap_getsubscribed arginfo_imap_list

#define arginfo_imap_getmailboxes arginfo_imap_list
Expand Down
Loading