Closed Seldaek closed 2 years ago
@zamoroka while you're merging, can you do this one as well? :)
Hi @Seldaek , @peterjaap
The \Composer\Composer::getVersion()
was introduced in composer 1.8.5 which means that we need to drop support of all previous releases
Since 1.8.5 was released in april 2019 and Composer 1 is on it's way out, I'd be perfectly fine with that.
@Seldaek could you please add the min composer version in composer.json?
"composer-plugin-api": "^1.8.5 || ^2.0",
There is no way to do this unfortunately as the plugin-api is stuck at 1.1.0 on Composer 1.
Either we require composer-runtime-api: ^1 || ^2
which will force Composer 1.10.6+ or 2.0+, or we leave it as is and probably it'll be fine.
From my stats I see 1-2% of installs coming from Composer versions older than 1.8.5 so I think it's fairly irrelevant, those are unlikely to be updating packages anyway..
@Seldaek I think adding
"composer/composer": ">=1.8.5"
to the "require" section could do the trick
Nope this is a bad idea as it'd add composer in the vendor dir, and not actually fix anything. Your options are what I said above, or if you want to absolutely support everything add a method_exists call before using getVersion?
ok, let then go with composer-runtime-api: ^1 || ^2
option.
Thanks for your comments
Yeah I think this makes the most sense, anyone stuck on an old composer will then remain on the previous version of the plugin, no big deal.
OK good to go then I think.
Fixes https://github.com/vaimo/composer-patches/issues/81