Skip to content
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

Support composer 2 #220

Closed
wants to merge 1 commit into from
Closed

Support composer 2 #220

wants to merge 1 commit into from

Conversation

eiriksm
Copy link

@eiriksm eiriksm commented Apr 14, 2020

This fixes #218

I just disabled the plugin when a certain class constant was removed (indicating that composer 2 is used).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 79.567% when pulling 9a658b2 on eiriksm:feat/composer-2 into fb6724d on hirak:master.

Copy link
Contributor

@kubawerlos kubawerlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -63,6 +63,10 @@ public function activate(Composer $composer, IO\IOInterface $io)
}
// @codeCoverageIgnoreEnd

if (!defined('\Composer\Installer\InstallerEvents::POST_DEPENDENCIES_SOLVING')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this condition?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It indicates that composer 2 is used (as stated)? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But for this PluginInterface::PLUGIN_API_VERSION was introduced.

@@ -97,6 +101,9 @@ class_exists(__NAMESPACE__ . '\\' . $class);

public static function getSubscribedEvents()
{
if (!defined('\Composer\Installer\InstallerEvents::POST_DEPENDENCIES_SOLVING')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this condition?

@heddn
Copy link

heddn commented Oct 26, 2020

This is important now as I have CI builds failing now that https://github.com/composer/composer/releases/tag/2.0.0 is released.

@Levivb
Copy link

Levivb commented Oct 26, 2020

@heddn depending on your setup you could remove this plugin from your CI pipeline as composer 2 natively downloads necessary files in parallel

@heddn
Copy link

heddn commented Oct 26, 2020

I can and will, but I have several legacy jobs that haven't updated yet and a simple fix here would let them continue to run without interruption.

@hirak
Copy link
Owner

hirak commented Oct 28, 2020

I won't fix this plugin anymore, just use Composer 2.
composer/composer#5293

@hirak hirak closed this Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update composer plugin api version
6 participants