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

Error: Call to undefined method Google\Client::isUsingJwtWithScope() #2162

Closed
stephanvierkant opened this issue Dec 1, 2021 · 9 comments
Closed

Comments

@stephanvierkant
Copy link
Contributor

stephanvierkant commented Dec 1, 2021

#2153 created an issue because \Google\Client doesn't have a method called isUsingJwtWithScope:

Error: Call to undefined method Google\Client::isUsingJwtWithScope()

if ($credentials instanceof ServiceAccountCredentials && $this->isUsingJwtWithScope()) {

Ping @bshaffer

Maybe some kind of static analysis should be added to the test suite?

@realtebo
Copy link

realtebo commented Dec 2, 2021

[2021-12-02 00:59:21] production.ERROR: Call to undefined method Google\Client::isUsingJwtWithScope() {"userId":"d25d0506-8a96-3675-99b1-92dd4843dc06","exception":"[object] (Error(code: 0): Call to undefined method Google\Client::isUsingJwtWithScope() at /vendor/google/apiclient/src/Client.php:1258)
[stacktrace]
#0 /vendor/google/apiclient/src/Client.php(436): Google\Client->createApplicationDefaultCredentials()
#1 /vendor/google/apiclient/src/Client.php(911): Google\Client->authorize()

Same problem here.
Don't you run at least a basic test suite before release ?! You broke our code

@jdevinemt
Copy link

I also have this issue. I'm also seeing #[\ReturnTypeWillChange] sprinkled throughout the code, which appears to be specific to php 8.1+. But in the package description it should work with older php versions.

@sheyDev
Copy link

sheyDev commented Dec 2, 2021

Call to undefined method Google\Client::isUsingJwtWithScope();

Running into the same problem. Any fix for this?
PHP 7.4
V2.12.0

@jdevinemt
Copy link

jdevinemt commented Dec 2, 2021

@sheyDev

Running into the same problem. Any fix for this?

You can just revert to v2.11.0 until it's fixed.

@bshaffer
Copy link
Contributor

bshaffer commented Dec 2, 2021

Fixed in v2.12.1

@bshaffer bshaffer closed this as completed Dec 2, 2021
@stephanvierkant
Copy link
Contributor Author

Fixed in v2.12.1

Thanks for fixing this quickly!

Will there be any measures taken to prevent this kind of bugs? Even the most simple kind of static analysis would have found this.

@bshaffer
Copy link
Contributor

bshaffer commented Dec 2, 2021

I agree, and am also surprised it slipped through, since we have an extensive testing suite... there must be something unexpected happening with regards to this error, unfortunately.

@stephanvierkant
Copy link
Contributor Author

Can I help with implementing static analysis, like phpstan?

@bshaffer
Copy link
Contributor

bshaffer commented Dec 3, 2021

@stephanvierkant If you wanted to submit a Pr for that, that would be super great!

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

5 participants