EUncaught Exception: InvalidArgumentException Could not get class storage
When I am scanning project with just initialized Psalm I am getting this exception:
./bin/psalm
Target PHP version: 7.3 (inferred from composer.json)
Scanning files...
Analyzing files...
░░░░░░░░░░░EEE░░░EEE░░░░░░░░░E░░░░░░░EEEE░░E░░E░░E░░░E░░EE░░ 60 / 844 (7%)
░E░░░░░░░░░E░░E░░░E░░░░░░░E░░E░E░░░░░E░E░░░E░░░░░░░░EE░░░░E░ 120 / 844 (14%)
░E░E░E░E░E░░E░░░░░░░░░░░░░░░░░░░░░░░░E░E░░░░░EUncaught Exception: InvalidArgumentException Could not get class storage for application\controller\consoletaskscontroller
Emitted in /home/dev/domains/a/vendor/vimeo/psalm/src/Psalm/Internal/Provider/ClassLikeStorageProvider.php:46
What this might be?
Are you using intersections in native types in your project?
Can you run psalm with --debug-by-line and check the last path before it crashes? It should show us the trigger code
It didn't crushed with this line which is weird.
Ok, --debug-by-line has a side effect because it makes Psalm run on only 1 thread. That in itself could solve your issue if it's related to threads. Can you try without --debug-by-line but with --threads=1 ?
Do I need to clear cache or whatever? It's going through just imply running ./bin/psalm. I wanna try to find what was that - if it is a bug.
I did not understand your answer. What was the result of --threads=1? Did it pass?
Yes, it is passing. As well as ./bin/psalm is passing now. But it was not passing earlier.
oh, ok. It might be cache related indeed. Does it pass after a --clear-global-cache and then with --no-cache?
I suspect this can be closed as fixed by https://github.com/vimeo/psalm/pull/10856
I'll close this, no response from author and with additional fixes added with threads, this report is obsolete now