Closed samdark closed 4 years ago
I have not yet had the opportunity to look in more detail the version 2.0 of Composer. Is it just a matter of version constraint? Or, are there more problematic changes for this plugin?
The interface has changed, see https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#upgrades-guides-for-composer-1x-to-20
Looks like the following would work:
composer.json
. "composer-plugin-api": "^1.0|^2.0",
In the Foxy
class add two dummy methods:
public function deactivate(Composer $composer, IOInterface $io): void
{
// do nothing
}
public function uninstall(Composer $composer, IOInterface $io): void
{
// do nothing
}
deactivate
and uninstall
but it doesn't seem to be necessary for the plugin to just work as before.@samdark Thank you! I will try to find some time this weekend to test the compatibility with Composer v2.
Compatibility added by b7473e7cc79080b6369e2e5c161a43f814088f82.
Interesting. Composer 2 fails to install it:
Loading composer repositories with package information
Updating dependencies
Lock file operations: 47 installs, 0 updates, 0 removals
...
- Locking foxy/foxy (dev-master 7efd3d1)
...
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 47 installs, 0 updates, 0 removals
- Installing foxy/foxy (dev-master 7efd3d1): Extracting archive
Plugin initialization failed (Invalid version string "d173af2d7ac1408655df2cf6670ea0262e06d137"), uninstalling plugin
- Removing foxy/foxy (dev-master 7efd3d1)
Install of foxy/foxy failed
You can try with https://github.com/yiisoft/yii-bootstrap4
Sure enough, I also get this error now.
My test was with the master branch and not with a compiled version of Composer. This comes from checking the version of Composer which is a SHA1 and not @package_version@
for the snapshots.
I add this case right away.
Compatibility with Composer snapshots added by 201420a5aac203de7e7e87e620fe5e046cca78c8.
Works now. Thank you!
composer-plugin-api
for upcoming Composer 2 (can be installed withcomposer self-update --snapshot
) has version 2.0.0.The foxy/foxy package requires
composer-plugin-api
version 1.0.0 thus can't be used with Composer 2.