From a09a014a1984d2ac875c6b1220b7f17ca7d0a873 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Sun, 6 Jun 2021 22:43:27 +0300 Subject: [PATCH] update php to 8.0.7 --- Dockerfile | 2 +- PDO/PDO.php | 11 +++++++++-- SimpleXML/SimpleXML.php | 4 ++-- curl/curl_d.php | 2 +- openssl/openssl.php | 4 ++-- sodium/sodium.php | 12 ++++++------ standard/standard_9.php | 4 ++-- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index b8a488cd2..4b2598d3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0.6-alpine +FROM php:8.0.7-alpine RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/PDO/PDO.php b/PDO/PDO.php index c7415b255..7e0945fc2 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -548,6 +548,13 @@ class PDO */ public const FETCH_ORI_REL = 5; + /** + * Specifies that the default fetch mode shall be used. + * @since 8.0.7 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-default + */ + public const FETCH_DEFAULT = 0; + /** * Create a PDOStatement object with a forward-only cursor. This is the * default cursor choice, as it is the fastest and most common data access @@ -1467,13 +1474,13 @@ public function fetchAll($mode = PDO::FETCH_BOTH, ...$args) {} * @param string $class [optional]

* Name of the created class. *

- * @param array $ctorArgs [optional]

+ * @param array $constructorArgs [optional]

* Elements of this array are passed to the constructor. *

* @return mixed an instance of the required class with property names that * correspond to the column names or FALSE on failure. */ - public function fetchObject($class = "stdClass", array $ctorArgs = []) {} + public function fetchObject($class = "stdClass", array $constructorArgs = []) {} /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
diff --git a/SimpleXML/SimpleXML.php b/SimpleXML/SimpleXML.php index f5c64b71e..2260b142a 100644 --- a/SimpleXML/SimpleXML.php +++ b/SimpleXML/SimpleXML.php @@ -450,7 +450,7 @@ function simplexml_load_string(string $data, ?string $class_name = "SimpleXMLEle /** * Get a SimpleXMLElement object from a DOM node. * @link https://php.net/manual/en/function.simplexml-import-dom.php - * @param DOMNode $node

+ * @param SimpleXMLElement|DOMNode $node

* A DOM Element node *

* @param string|null $class_name [optional]

@@ -461,6 +461,6 @@ function simplexml_load_string(string $data, ?string $class_name = "SimpleXMLEle *

* @return SimpleXMLElement|null a SimpleXMLElement or FALSE on failure. */ -function simplexml_import_dom(DOMNode $node, ?string $class_name = "SimpleXMLElement"): ?SimpleXMLElement {} +function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = "SimpleXMLElement"): ?SimpleXMLElement {} // End of SimpleXML v.0.1 diff --git a/curl/curl_d.php b/curl/curl_d.php index d2ba6a732..f4f31c077 100644 --- a/curl/curl_d.php +++ b/curl/curl_d.php @@ -1144,7 +1144,7 @@ * Will be the most recent age value for the libcurl. * @link https://php.net/manual/en/curl.constants.php */ -define('CURLVERSION_NOW', 8); +define('CURLVERSION_NOW', 9); /** * All fine. Proceed as usual. * @link https://php.net/manual/en/curl.constants.php diff --git a/openssl/openssl.php b/openssl/openssl.php index 727686893..d4a3ef353 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -1020,12 +1020,12 @@ function openssl_get_cert_locations(): array {} function openssl_get_curve_names(): array|false {} /** - * @param string $input_filename + * @param string $data * @param array &$certificates * @return bool * @since 7.2 */ -function openssl_pkcs7_read(string $input_filename, &$certificates): bool {} +function openssl_pkcs7_read(string $data, &$certificates): bool {} /** * Verifies that the data block is intact, the signer is who they say they are, and returns the certs of the signers. diff --git a/sodium/sodium.php b/sodium/sodium.php index e73cb52a5..878f7df34 100644 --- a/sodium/sodium.php +++ b/sodium/sodium.php @@ -316,12 +316,12 @@ function sodium_crypto_stream_keygen(): string {} * Add padding data * @link https://php.net/manual/en/function.sodium-pad.php * @param string $string - * @param int $length + * @param int $block_size * @return string * @throws SodiumException * @since 7.2 */ -function sodium_pad(string $string, int $length): string {} +function sodium_pad(string $string, int $block_size): string {} /** * Remove padding data @@ -428,12 +428,12 @@ function sodium_crypto_box_publickey_from_secretkey(string $secret_key): string * X25519 + Xsalsa20 + Poly1305 + BLAKE2b * @link https://www.php.net/manual/en/function.sodium-crypto-box-seal.php * @param string $message - * @param string $key_pair + * @param string $public_key * @return string * @throws SodiumException * @since 7.2 */ -function sodium_crypto_box_seal(string $message, string $key_pair): string {} +function sodium_crypto_box_seal(string $message, string $public_key): string {} /** * Anonymous public-key encryption (decrypt) @@ -728,13 +728,13 @@ function sodium_crypto_sign_keypair_from_secretkey_and_publickey( /** * Verify a signed message and return the plaintext * @link https://www.php.net/manual/en/function.sodium-crypto-sign-open.php - * @param string $ciphertext + * @param string $signed_message * @param string $public_key * @return string|false * @throws SodiumException * @since 7.2 */ -function sodium_crypto_sign_open(string $ciphertext, string $public_key): string|false {} +function sodium_crypto_sign_open(string $signed_message, string $public_key): string|false {} /** * Get the public key from an Ed25519 keypair diff --git a/standard/standard_9.php b/standard/standard_9.php index ff6c238fb..28623de43 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -921,9 +921,9 @@ class AssertionError extends Error {} * @param mixed $value [optional]

* An optional new value for the option. *

- * @return object|array|string|int|null The original setting of any option. + * @return mixed The original setting of any option. */ -function assert_options(int $option, mixed $value): object|array|string|int|null {} +function assert_options(int $option, mixed $value): mixed {} /** * Compares two "PHP-standardized" version number strings