From 54123e4093c7770ec3d807263274ce750302bc4b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 22 Dec 2021 10:49:06 +0100 Subject: [PATCH] Fix autoloader compatibility with older releases of laminas/laminas-zendframework-bridge, refs #10349 --- src/Composer/Plugin/PluginManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index 01e708e57..adb769f83 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -241,6 +241,11 @@ class PluginManager $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' && $localRepo->findPackage('laminas/laminas-zendframework-bridge', '<1.4.1')) { + continue; + } \Composer\Autoload\composerRequire($fileIdentifier, $file); }