Closed
Description
Recently, when Github actions runs psalm
, it has an error:
> ./vendor/bin/psalm --no-cache
PHP Fatal error: Uncaught Psalm\Exception\ConfigException: Error parsing file /home/runner/work/phpcs-variable-analysis/phpcs-variable-analysis/ on line 9: Element '{https://getpsalm.org/schema/config}psalm': No matching global declaration available for the validation root.
in /home/runner/work/phpcs-variable-analysis/phpcs-variable-analysis/vendor/vimeo/psalm/src/Psalm/Config.php:215
I'm not sure why this happens but one clue is the version of psalm being used:
- Installing vimeo/psalm (0.3.14): Extracting archive
Considering this is running in PHP 8.3.13, it's strange that we're getting version 0.3 instead of version 5.21. 🙃
Note that psalm runs just fine (from composer static-analysis
) in my local install. This is only happening in github actions.
A full example of this can be seen here: https://github.com/sirbrillig/phpcs-variable-analysis/actions/runs/11884238927/job/33112139346