Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 compatibility #2636

Closed
mikkamp opened this issue Nov 14, 2024 · 2 comments
Closed

PHP 8.4 compatibility #2636

mikkamp opened this issue Nov 14, 2024 · 2 comments

Comments

@mikkamp
Copy link

mikkamp commented Nov 14, 2024

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
@cococaline
Copy link

i face the same issue on php 8.4

@mikkamp
Copy link
Author

mikkamp commented Nov 25, 2024

Seems there is already a PR that resolves these issues: #2638

Included in the 2.18.1 release.

@mikkamp mikkamp closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants