From 0b91d64d88da71b5e04d469383541cb4be86a186 Mon Sep 17 00:00:00 2001 From: Kharhamel Date: Wed, 14 Oct 2020 03:14:36 +0000 Subject: [PATCH] Automatically regenerate the files --- generated/filesystem.php | 8 +- generated/functionsList.php | 2 + generated/image.php | 9 +- generated/imap.php | 195 ++++++++++++++++++++++++++++++++++++ generated/info.php | 15 --- rector-migrate-0.7.php | 2 + 6 files changed, 207 insertions(+), 24 deletions(-) diff --git a/generated/filesystem.php b/generated/filesystem.php index e8999002..ee0a4bdf 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -595,8 +595,8 @@ function flock($handle, int $operation, ?int &$wouldblock = null): void * a local file, then it will try to open a stream on that file. * The file must be accessible to PHP, so you need to ensure that * the file access permissions allow this access. - * If you have enabled safe mode - * or open_basedir further + * If you have enabled + * open_basedir further * restrictions may apply. * * If PHP has decided that filename specifies @@ -1135,7 +1135,9 @@ function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $con * * The structure of the ini file is the same as the php.ini's. * - * @param string $filename The filename of the ini file being parsed. + * @param string $filename The filename of the ini file being parsed. If a relative path is used, + * it is evaluated relative to the current working directory, then the + * include_path. * @param bool $process_sections By setting the process_sections * parameter to TRUE, you get a multidimensional array, with * the section names and settings included. The default diff --git a/generated/functionsList.php b/generated/functionsList.php index 1353a0e9..807d0a0e 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -336,6 +336,7 @@ 'imap_headerinfo', 'imap_mail', 'imap_mailboxmsginfo', + 'imap_mail_compose', 'imap_mail_copy', 'imap_mail_move', 'imap_mutf7_to_utf8', @@ -346,6 +347,7 @@ 'imap_setacl', 'imap_setflag_full', 'imap_set_quota', + 'imap_sort', 'imap_subscribe', 'imap_thread', 'imap_timeout', diff --git a/generated/image.php b/generated/image.php index 8e380b2e..f1dc2183 100644 --- a/generated/image.php +++ b/generated/image.php @@ -1904,15 +1904,15 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the * number of degrees to rotate the image anticlockwise. * @param int $bgd_color Specifies the color of the uncovered zone after the rotation - * @param int $ignore_transparent If set and non-zero, transparent colors are ignored (otherwise kept). + * @param int $dummy This parameter is unused. * @return resource Returns an image resource for the rotated image. * @throws ImageException * */ -function imagerotate($image, float $angle, int $bgd_color, int $ignore_transparent = 0) +function imagerotate($image, float $angle, int $bgd_color, int $dummy = 0) { error_clear_last(); - $result = \imagerotate($image, $angle, $bgd_color, $ignore_transparent); + $result = \imagerotate($image, $angle, $bgd_color, $dummy); if ($result === false) { throw ImageException::createFromPhpError(); } @@ -1953,9 +1953,6 @@ function imagesavealpha($image, bool $saveflag): void * @param int $new_width The width to scale the image to. * @param int $new_height The height to scale the image to. If omitted or negative, the aspect * ratio will be preserved. - * - * You should always provide the height if using PHP 5.5.18 or earlier, or - * PHP 5.6.2 or earlier, as the aspect ratio calculation was incorrect. * @param int $mode One of IMG_NEAREST_NEIGHBOUR, * IMG_BILINEAR_FIXED, * IMG_BICUBIC, diff --git a/generated/imap.php b/generated/imap.php index 6032962f..acd8672c 100644 --- a/generated/imap.php +++ b/generated/imap.php @@ -578,6 +578,124 @@ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int } +/** + * Create a MIME message based on the given envelope + * and body sections. + * + * @param array $envelope An associative array of header fields. Valid keys are: "remail", + * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", + * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. + * To set additional headers, the key "custom_headers" is supported, which expects + * an array of those headers, e.g. ["User-Agent: My Mail Client"]. + * @param array $body An indexed array of bodies. The first body is the main body of the message; + * only if it has a type of TYPEMULTIPART, further bodies + * are processed; these bodies constitute the bodies of the parts. + * + * + * Body Array Structure + * + * + * + * Key + * Type + * Description + * + * + * + * + * type + * int + * + * The MIME type. + * One of TYPETEXT (default), TYPEMULTIPART, + * TYPEMESSAGE, TYPEAPPLICATION, + * TYPEAUDIO, TYPEIMAGE, + * TYPEMODEL or TYPEOTHER. + * + * + * + * encoding + * int + * + * The Content-Transfer-Encoding. + * One of ENC7BIT (default), ENC8BIT, + * ENCBINARY, ENCBASE64, + * ENCQUOTEDPRINTABLE or ENCOTHER. + * + * + * + * charset + * string + * The charset parameter of the MIME type. + * + * + * type.parameters + * array + * An associative array of Content-Type parameter names and their values. + * + * + * subtype + * string + * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. + * + * + * id + * string + * The Content-ID. + * + * + * description + * string + * The Content-Description. + * + * + * disposition.type + * string + * The Content-Disposition, e.g. 'attachment'. + * + * + * disposition + * array + * An associative array of Content-Disposition parameter names and values. + * + * + * contents.data + * string + * The payload. + * + * + * lines + * int + * The size of the payload in lines. + * + * + * bytes + * int + * The size of the payload in bytes. + * + * + * md5 + * string + * The MD5 checksum of the payload. + * + * + * + * + * @return string Returns the MIME message as string. + * @throws ImapException + * + */ +function imap_mail_compose(array $envelope, array $body): string +{ + error_clear_last(); + $result = \imap_mail_compose($envelope, $body); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + /** * Copies mail messages specified by msglist * to specified mailbox. @@ -1141,6 +1259,83 @@ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $op } +/** + * Gets and sorts message numbers by the given parameters. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $criteria Criteria can be one (and only one) of the following: + * + * + * + * SORTDATE - message Date + * + * + * + * + * SORTARRIVAL - arrival date + * + * + * + * + * SORTFROM - mailbox in first From address + * + * + * + * + * SORTSUBJECT - message subject + * + * + * + * + * SORTTO - mailbox in first To address + * + * + * + * + * SORTCC - mailbox in first cc address + * + * + * + * + * SORTSIZE - size of message in octets + * + * + * + * @param int $reverse Set this to 1 for reverse sorting + * @param int $options The options are a bitmask of one or more of the + * following: + * + * + * + * SE_UID - Return UIDs instead of sequence numbers + * + * + * + * + * SE_NOPREFETCH - Don't prefetch searched messages + * + * + * + * @param string $search_criteria IMAP2-format search criteria string. For details see + * imap_search. + * @param string $charset MIME character set to use when sorting strings. + * @return array Returns an array of message numbers sorted by the given + * parameters. + * @throws ImapException + * + */ +function imap_sort($imap_stream, int $criteria, int $reverse, int $options = 0, string $search_criteria = null, string $charset = null): array +{ + error_clear_last(); + $result = \imap_sort($imap_stream, $criteria, $reverse, $options, $search_criteria, $charset); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + /** * Subscribe to a new mailbox. * diff --git a/generated/info.php b/generated/info.php index 49e4d289..1a76b406 100644 --- a/generated/info.php +++ b/generated/info.php @@ -449,21 +449,6 @@ function phpinfo(int $what = INFO_ALL): void * request. At the end of the request the environment is restored to its * original state. * - * Setting certain environment variables may be a potential security breach. - * The safe_mode_allowed_env_vars directive contains a - * comma-delimited list of prefixes. In Safe Mode, the user may only alter - * environment variables whose names begin with the prefixes supplied by - * this directive. By default, users will only be able to set environment - * variables that begin with PHP_ (e.g. - * PHP_FOO=BAR). Note: if this directive is empty, PHP - * will let the user modify ANY environment variable! - * - * The safe_mode_protected_env_vars directive contains a - * comma-delimited list of environment variables, that the end user won't be - * able to change using putenv. These variables will - * be protected even if safe_mode_allowed_env_vars is set - * to allow to change them. - * * @param string $setting The setting, like "FOO=BAR" * @throws InfoException * diff --git a/rector-migrate-0.7.php b/rector-migrate-0.7.php index 2f277b73..d155696d 100644 --- a/rector-migrate-0.7.php +++ b/rector-migrate-0.7.php @@ -346,6 +346,7 @@ 'imap_headerinfo' => 'Safe\imap_headerinfo', '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', 'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8', @@ -356,6 +357,7 @@ 'imap_setacl' => 'Safe\imap_setacl', 'imap_setflag_full' => 'Safe\imap_setflag_full', 'imap_set_quota' => 'Safe\imap_set_quota', + 'imap_sort' => 'Safe\imap_sort', 'imap_subscribe' => 'Safe\imap_subscribe', 'imap_thread' => 'Safe\imap_thread', 'imap_timeout' => 'Safe\imap_timeout',