-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for composer-plugin-api ^2 and implement PlginInterface methods from ^2 #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks a lot for looking into it @Ayesh.
Regarding the composer failure, this can be fixed by adding:
composer config minimum-stability dev
composer config prefer-stable true
to the Travis configuration file with maybe a TODO to say this is necessary until Composer 2 is tagged as stable
Thanks a lot for your quick response @theofidry. Setting composer stability indeed fixed the tests, except for PHP 5.4 and 5.5 that errors with |
PHP 5.4 & 5.5 have been quite annoying as of late, so maybe it's time to drop them. Would you mind opening another PR where we remove both of those versions? |
@theofidry - I just opened a PR. It removes PHP 5.4 and 5.5 once and for all, and make some improvements in short-array syntax. If it is merged, this PR will not be mergeable without resolving conflicts. I have https://github.com/Ayesh/composer-bin-plugin/tree/composer-test-travis branch that I rebase to this PR, so this PR can be merged as well :) Thank you 🙏. |
I recommend you to merge #54 (not rebase): the comments are squashed in the end so it's ok and this allows to not mess up with any existing comment when there is any |
…ethods from ^2 Composer version 2 has `composer-plugin-api` version 2. This commit updates the version constraint to `^1 || ^2` so we can support both composer versions. See https://php.watch/articles/composer-2 for more changes in API. Empty methods \Bamarni\Composer\Bin\Plugin::deactivate() and \Bamarni\Composer\Bin\Plugin::uninstall() are added to make it compatible both versions.
Thanks @theofidry . This PR is now based on the merged #54. There were some excessive line issues but they are corrected now. |
Great, thanks! |
Hi Bilal,
This PR adds support for Composer v2 for this plugin! composer/composer#8726 and has more information on changes.
Composer version 2 has
composer-plugin-api
version 2. This commit updates the version constraint to^1 || ^2
so we can support both composer versions.See What's new in Composer 2 and UPGRADE-2.0 for more changes in API. Empty methods
\Bamarni\Composer\Bin\Plugin::deactivate()
and\Bamarni\Composer\Bin\Plugin::uninstall()
are added to make it compatible both versions.Travis will report that this builds fails. It is because the
composer/composer
package is not pinned to a version constraint. Even without these changes, builds fail.Thank you.