diff --git a/generated/functionsList.php b/generated/functionsList.php index 5a590058..536f1a8a 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -674,7 +674,6 @@ 'openssl_private_encrypt', 'openssl_public_decrypt', 'openssl_public_encrypt', - 'openssl_random_pseudo_bytes', 'openssl_seal', 'openssl_sign', 'openssl_spki_export', diff --git a/generated/openssl.php b/generated/openssl.php index b201ebc6..bef308dc 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -1159,34 +1159,6 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ } -/** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes on success. - * @throws OpensslException - * - */ -function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string -{ - error_clear_last(); - $result = \openssl_random_pseudo_bytes($length, $strong_result); - if ($result === false) { - throw OpensslException::createFromPhpError(); - } - return $result; -} - - /** * openssl_seal seals (encrypts) * data by using the given cipher_algo with a randomly generated diff --git a/lib/special_cases.php b/lib/special_cases.php index b95fe0b7..2f21ed00 100644 --- a/lib/special_cases.php +++ b/lib/special_cases.php @@ -27,15 +27,15 @@ * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int<1, max> $depth User specified recursion depth. - * @param int $options Bitmask of JSON decode options. + * @param int $flags Bitmask of JSON decode options. * * @return mixed * @throws JsonException if the JSON cannot be decoded. * @link http://www.php.net/manual/en/function.json-decode.php */ -function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) +function json_decode(string $json, bool $assoc = false, int $depth = 512, int $flags = 0): mixed { - $data = \json_decode($json, $assoc, $depth, $options); + $data = \json_decode($json, $assoc, $depth, $flags); if (JSON_ERROR_NONE !== json_last_error()) { throw JsonException::createFromPhpError(); } diff --git a/rector-migrate.php b/rector-migrate.php index 4f17de5e..db420d4c 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -684,7 +684,6 @@ 'openssl_private_encrypt' => 'Safe\openssl_private_encrypt', 'openssl_public_decrypt' => 'Safe\openssl_public_decrypt', 'openssl_public_encrypt' => 'Safe\openssl_public_encrypt', - 'openssl_random_pseudo_bytes' => 'Safe\openssl_random_pseudo_bytes', 'openssl_seal' => 'Safe\openssl_seal', 'openssl_sign' => 'Safe\openssl_sign', 'openssl_spki_export' => 'Safe\openssl_spki_export',