composer-downloads-plugin and civicrm-asset-plugin need updates for composer v2
At time of writing, composer
is preparing for their next major release (v1 => v2). See also:
- https://github.com/composer/composer/issues/8726
- https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors
From what I've seen so far, there is an easy part and a hard part for updating composer-downloads-plugin
:
-
Easy part: The
PluginInterface
expects a few more methods. Just add placeholders. (Ex: https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors) -
Hard part: The download system has been reorganized to use ReactPHP
Promise
s, and an internaldownload()
method has been rearranged into multiple methods (download()
,prepare()
,install()
).- Note to self: think more about the relationship between
Composer\Installer\InstallationManager
(which takes a lot of effort to coordinate the on-going promises) andLastCall\DownloadsPlugin\Plugin::installUpdateDownloads()
(which also coordinates multiple actions).
- Note to self: think more about the relationship between
Edited by totten