From a2a8fa4e7e8725f134837c0c08fd35bd00bdb2f2 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 30 Dec 2021 10:44:36 +0100 Subject: [PATCH] Always exclude laminas/laminas-zendframework-bridge:src/autoload.php, fixes #10401 --- src/Composer/Plugin/PluginManager.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index be8898fdacc6..2895c3ca8dfb 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -252,9 +252,10 @@ public function registerPackage(PackageInterface $package, $failOnMissingClasses $classLoader->register(false); foreach ($map['files'] as $fileIdentifier => $file) { - // exclude laminas/laminas-zendframework-bridge:src/autoload.php in versions <1.4.1 as it was broken on fresh installs - // see https://github.com/composer/composer/issues/10349 - this hack can be removed once <1.4.1 releases stop being installed - if ($fileIdentifier === '7e9bd612cc444b3eed788ebbe46263a0' && null !== $localRepo->findPackage('laminas/laminas-zendframework-bridge', '<1.4.1')) { + // exclude laminas/laminas-zendframework-bridge:src/autoload.php as it breaks Composer in some conditions + // see https://github.com/composer/composer/issues/10349 and https://github.com/composer/composer/issues/10401 + // this hack can be removed once this deprecated package stop being installed + if ($fileIdentifier === '7e9bd612cc444b3eed788ebbe46263a0') { continue; } \Composer\Autoload\composerRequire($fileIdentifier, $file);