psalm icon indicating copy to clipboard operation
psalm copied to clipboard

Bug: Internal Psalm Error: Could not get class storage for <interface>

Open lotyp opened this issue 1 year ago • 3 comments

Psalm version: 5.24.0

Similar issues:

  • https://github.com/vimeo/psalm/issues/10350
  • https://github.com/vimeo/psalm/issues/10895
  • https://github.com/vimeo/psalm/issues/10708

I'm getting error, when running infection tests:

In ClassLikeStorageProvider.php line 45:

  Could not get class storage for buggregator\trap\traffic\message\multipart\  
  part

Error happens when this file is analyzed:

https://github.com/buggregator/trap/blob/master/src/Traffic/Message/Multipart/Part.php

Here is failed job:

https://github.com/buggregator/trap/actions/runs/9366875639/job/25785333860?pr=110

lotyp avatar Jun 04 '24 22:06 lotyp

Hey @lotyp, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

psalm-github-bot[bot] avatar Jun 04 '24 22:06 psalm-github-bot[bot]

Looks like this error is caused when infection/infection is used. Need to dig deeper, which mutation causes such error. But it would be helpful, if more descriptive exception would be thrown.

lotyp avatar Jun 07 '24 19:06 lotyp

Looks like this error is caused when infection/infection is used. Need to dig deeper, which mutation causes such error. But it would be helpful, if more descriptive exception would be thrown.

I stumbled across this as well, using Psalm 6.13.1, makes it hard to use Psalm in general if it stops mid scan with very little output about where the error occurred.

bpearson-swoop avatar Sep 29 '25 09:09 bpearson-swoop