Closed gmazzap closed 3 years ago
Could make sense yes, you did see that the latest psalm versions require this fork directly though?
Could make sense yes, you did see that the latest psalm versions require this fork directly though?
Yes @Seldaek the problem occurs on PHP 7.0. Latest Psalm version that supports PHP 7.0 is 3.2.2 which depends on that package I mentioned.
That means that on PHP 7.0 there's no way to use Composer 2 in projects requiring Psalm.
Yeah the problem is they require muglug's fork in 1.2.4 exactly.. and that has a different namespace as per https://github.com/vimeo/psalm/blob/3.2.12/src/psalm_plugin.php#L9 so this isn't gonna work :/
IMO what you could do as a hack is add provide: {muglug/package-versions-56: 1.2.4}
to your composer.json (granted it's not a public package), so composer 2 should resolve.. And then you declare a dummy class returning a fixed version to make https://github.com/vimeo/psalm/blob/3.2.12/src/psalm_plugin.php#L16 run. That should let you upgrade to composer 2.
It's a public package. I'm looking the options of dropping 7.0 support.
Feel free to close this and thanks for looking into it.
Yeah I don't see another option here sorry.
I'm having an issue with a project that has to support PHP 7.0+ and uses Psalm.
Psalm <= 3.2.12 uses muglug/package-versions-56 that requires composer-plugin-api: ^1.
Do you think it makes sense to also replace that package here?