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

"Could not get class storage for X" #10895

Open
akaDJon opened this issue Apr 10, 2024 · 0 comments
Open

"Could not get class storage for X" #10895

akaDJon opened this issue Apr 10, 2024 · 0 comments

Comments

@akaDJon
Copy link

akaDJon commented Apr 10, 2024

I got error "Could not get class storage for X" with my codebase. I see many issues on github with this problem.
My codebase has many aliases and I found solve!

I fix it in file AssertionsFromInheritanceResolver.php. I added function getUnAliasedName:

before:

        foreach ($inherited_classes_and_interfaces as $potential_assertion_providing_class) {
            $potential_assertion_providing_classlike_storage = $this->codebase->classlike_storage_provider->get(
                $potential_assertion_providing_class,
            );

after:

        foreach ($inherited_classes_and_interfaces as $potential_assertion_providing_class) {
            $potential_assertion_providing_class = $this->codebase->classlikes->getUnAliasedName($potential_assertion_providing_class);

            $potential_assertion_providing_classlike_storage = $this->codebase->classlike_storage_provider->get(
                $potential_assertion_providing_class,
            );
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

1 participant