MDL-81634 core: Fix implicitly defined nullables in lib/google

The version of this library we use is well and truly deprecated. These
will not be fixed upstream so we must do so.
This commit is contained in:
Andrew Nicols
2024-08-04 23:20:19 +08:00
parent 024e36be17
commit e05ae09017
4 changed files with 7 additions and 5 deletions
+2
View File
@@ -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
-----------
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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);