Installation broken with Composer 2 (sculpin/sculpin-theme-composer-plugin requires legacy composer-plugin-api) #454
Labels
legacy
Holding area for unresolved tickets from earlier Sculpin generations
Problem
Composer 2 has been released this weekend. Unfortunately, installing any Sculpin-based site currently fails when using Composer 2:
This weekend, Travis CI started shipping Composer 2 for PHP 7.4, so this has potential to break many existing builds. PHP 7.3 and older still use Composer 1 on Travis CI. Other CI systems may or may not make the same decision of course.
Analysis
The same installation instructions work just fine using Composer 1. The error output leads us to see this is actually an issue (outstanding upgrade) in
sculpin/sculpin-theme-composer-plugin
rather than the mainsculpin/sculpin
package. I figured posting here gives this problem more visibility (plus, most sites would only directly depend on this main package).Upgrading this package shouldn't be too much work according to Composer's upgrade docs. It looks like this would be a matter of adding a dummy
uninstall()
anddeactivate()
method, so this could potentially also be made compatible with both Composer 1 and Composer 2 without too much work. Unfortunately, that code does not currently ship any tests and I don't see any changes having any effect on my site, so I don't feel comfortable taking a stab at a PR and I'm only leaving this as a heads-up here for the time being.Work around
Fortunately, working around this problem temporarily is easy for most(?) sites using Sculpin.
You can simply downgrade to Composer 1 and the installation should work just fine again.
As an alternative, my site doesn't appear to actually require the conflicting
sculpin/sculpin-theme-composer-plugin
package (I make no use of any themes whatsoever and only use custom templates). This means I can configure Composer to ignore (replace with nothing) this affected package without causing any noticeable effects (comparing the build output and generated HTML) like this:The text was updated successfully, but these errors were encountered: