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
Could not get class storage for google_service in #4419
Comments
Does the error also appear with |
@muglug yes it does fail with or without a pre-existing cache and/or with the --no-cache flag. I now have a workaround; a separate psalm autoload file that simply has an unrolled version of that loop in a block that never gets executed:
Those class_alias-calls from the aliases.php are loaded via composer's autoload file. But I assume the code in src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php:953 which will do some important work with the explicit class_alias-calls doesn't work with loops like that. Perhaps you could work around having to statically parse class_alias, by doing a fall-back lookup in the I'm not sufficiently familiar with Psalm to know whether there are similar places where the original class of an alias is needed. |
Closing as stale, this was either fixed or reported again against a newer version. |
Psalm 3.18.2 fails on this construction in Google:
From: https://github.com/googleapis/google-api-php-client/blob/master/src/aliases.php
Apparently, they decided to move to PSR-code, but their auto-generated stuff still refers to Google_Service:
https://github.com/googleapis/google-api-php-client-services/tree/master/src/Google/Service
It trips up Psalm with this error:
The text was updated successfully, but these errors were encountered: