diff --git a/lib/google/readme_moodle.txt b/lib/google/readme_moodle.txt index 7c7f007e020..1cd5b86ebf3 100644 --- a/lib/google/readme_moodle.txt +++ b/lib/google/readme_moodle.txt @@ -55,6 +55,8 @@ Local changes (to reapply until upstream upgrades contain them): ``` * MDL-46563 - PHP 8.3 compliance - Converted use of `get_class()` to `static::class` + * MDL-81634 - PHP 8.4 compliance + - Implicitly defined nullables Information ----------- diff --git a/lib/google/src/Google/Http/REST.php b/lib/google/src/Google/Http/REST.php index e3489d28240..a36c6cd54d7 100644 --- a/lib/google/src/Google/Http/REST.php +++ b/lib/google/src/Google/Http/REST.php @@ -71,7 +71,7 @@ class Google_Http_REST * @param Google_Client $client * @return mixed|null */ - public static function decodeHttpResponse($response, Google_Client $client = null) + public static function decodeHttpResponse($response, ?Google_Client $client = null) { $code = $response->getResponseHttpCode(); $body = $response->getResponseBody(); diff --git a/lib/google/src/Google/IO/Exception.php b/lib/google/src/Google/IO/Exception.php index cc2421db037..e7beeb07e39 100644 --- a/lib/google/src/Google/IO/Exception.php +++ b/lib/google/src/Google/IO/Exception.php @@ -38,8 +38,8 @@ class Google_IO_Exception extends Google_Exception implements Google_Task_Retrya public function __construct( $message, $code = 0, - Exception $previous = null, - array $retryMap = null + ?Exception $previous = null, + ?array $retryMap = null ) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message, $code, $previous); diff --git a/lib/google/src/Google/Service/Exception.php b/lib/google/src/Google/Service/Exception.php index 0e994d5e472..276b7202dcd 100644 --- a/lib/google/src/Google/Service/Exception.php +++ b/lib/google/src/Google/Service/Exception.php @@ -46,9 +46,9 @@ class Google_Service_Exception extends Google_Exception implements Google_Task_R public function __construct( $message, $code = 0, - Exception $previous = null, + ?Exception $previous = null, $errors = array(), - array $retryMap = null + ?array $retryMap = null ) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message, $code, $previous);