From 62d0443e07d813ee0fe15db4c07103684eaa8384 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 19 May 2020 16:46:33 +0200 Subject: [PATCH] Avoid checking for readline in non-CLI contexts, fixes #8909 --- src/Composer/Autoload/AutoloadGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index bc334c927..c531b3424 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -608,7 +608,7 @@ EOF; } $extension = var_export($match[1], true); - if ($match[1] === 'pcntl') { + if ($match[1] === 'pcntl' || $match[1] === 'readline') { $requiredExtensions[$extension] = "PHP_SAPI !== 'cli' || extension_loaded($extension) || \$missingExtensions[] = $extension;\n"; } else { $requiredExtensions[$extension] = "extension_loaded($extension) || \$missingExtensions[] = $extension;\n";