psalm icon indicating copy to clipboard operation
psalm copied to clipboard

Psalm crushes in normal mode but ok in debug

Open drmnk opened this issue 1 month ago • 1 comments

After updating the package doctrine/mongodb-odm to version 2.11, the Psalm started crashing during a normal launch (vendor/bin/psalm --threads=1 --no-cache) with the following error:

7080 / 7601...Uncaught Amp\Parallel\Worker\TaskFailureException: InvalidArgumentException thrown in context with message "Could not get class storage for doctrine\odm\mongodb\aggregation\builder" and code "0" in /var/www/app/vendor/vimeo/psalm/src/Psalm/Internal/Provider/ClassLikeStorageProvider.php:45
Stack trace in context:
#0 /var/www/app/vendor/vimeo/psalm/src/Psalm/Internal/Type/TypeExpander.php(287): Psalm\Internal\Provider\ClassLikeStorageProvider->get("Doctrine\ODM\MongoDB\Aggreg...")

However, if I run it using the vendor/bin/psalm --threads=1 --no-cache --debug --debug-by-line command, everything works fine.

What could be the reason for this?

Tested on psalm versions >6.3. PHP 8.4 Inside docker container php8.4-fpm

drmnk avatar Nov 06 '25 09:11 drmnk

got a similar problem, but for "enum"

Uncaught InvalidArgumentException: Could not get class storage for infection\framework\enum\t in phar:///Users/staabm/workspace/infection/.tools/psalm/src/Psalm/Internal/Provider/ClassLikeStorageProvider.php:39

staabm avatar Nov 07 '25 07:11 staabm