From 9492dc7f7cd324d2cd5a619cbf727371e1b9d6b9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 14 Oct 2020 13:48:55 +0200 Subject: [PATCH] Make sure symfony/flex does not get loaded in a buggy version to avoid bogus issue reports --- src/Composer/Plugin/PluginManager.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index a1b2f1409..1a1b08b8e 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -149,6 +149,12 @@ class PluginManager return; } + + if ($package->getName() === 'symfony/flex' && version_compare($package->getVersion(), '1.9.8', '<')) { + $this->io->writeError('The "' . $package->getName() . '" plugin was skipped because it is not compatible with Composer 2+. Make sure to update it to version 1.9.8 or greater.'); + + return; + } } $oldInstallerPlugin = ($package->getType() === 'composer-installer');