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: Could not get class storage for static #2324

Closed
andyg0808 opened this issue Nov 11, 2019 · 2 comments
Closed

Error: Could not get class storage for static #2324

andyg0808 opened this issue Nov 11, 2019 · 2 comments
Labels

Comments

@andyg0808
Copy link

I'm currently running into an issue where Psalm is throwing an InvalidArgumentException with Could not get class storage for static.

I've been able to duplicate on psalm.dev: https://psalm.dev/r/32b598075a
Changing selfto static also fails, but if it's changed to the class name, it doesn't, for whatever that's worth.
Using uasort, it breaks in a way like it thinks I'm passing an array of strings: https://psalm.dev/r/ad786185a1

Possibly related to #2278.

@andyg0808 andyg0808 changed the title Could not get class storage for static Error: Could not get class storage for static Nov 11, 2019
@weirdan
Copy link
Collaborator

weirdan commented Nov 11, 2019

Shouldn't throw that, but you can replace 'self' with self::class as a workaround.

@muglug muglug closed this as completed in 658f86c Nov 11, 2019
@muglug
Copy link
Collaborator

muglug commented Nov 11, 2019

Sorry about that - @weirdan is right, changing to self::class will fix it more immediately.

@muglug muglug added the bug label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants