Skip to content

PHP 8.4 compatibility #2636

@mikkamp

Description

@mikkamp

We are bundling this library within our extension through composer and we've been working on PHP 8.4 compatibility and I ran into several deprecation messages about using an explicit nullable type.

Deprecated: Vendor\Google\Client::authorize(): Implicitly marking parameter $http as nullable is deprecated, the explicit nullable type must be used instead in vendor/google/apiclient/src/Client.php on line 451
-    public function authorize(ClientInterface $http = null)
+    public function authorize(?ClientInterface $http = null)
Deprecated: Vendor\Google\Client::fetchAccessTokenWithAssertion(): Implicitly marking parameter $authHttp as nullable is deprecated, the explicit nullable type must be used instead in vendor/google/apiclient/src/Client.php on line 318
-        public function fetchAccessTokenWithAssertion(ClientInterface $authHttp = null)
+        public function fetchAccessTokenWithAssertion(?ClientInterface $authHttp = null)
Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead
vendor/google/apiclient/src/Service/Exception.php:39
    public function __construct(
        $message,
        $code = 0,
-        Exception $previous = null,
+        ?Exception $previous = null,
        $errors = []
    ) {

Environment details

  • OS: multiple
  • PHP version: 8.4
  • Package name and version: google/apiclient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions