From fbc85dede80a9d4adfdd29d5081a8f92fcdd9bd1 Mon Sep 17 00:00:00 2001 From: Stephan Jorek <38257959+brandung-sjorek@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:14:54 +0200 Subject: [PATCH] allow chained proxy-binary php-inclusions (#10823) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * allow chained proxy-binary php-inclusion by skipping redundant “phpvfscomposer” stream-wrapper registration --- src/Composer/Installer/BinaryInstaller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Installer/BinaryInstaller.php index 417e9be2b..a96bfce0a 100644 --- a/src/Composer/Installer/BinaryInstaller.php +++ b/src/Composer/Installer/BinaryInstaller.php @@ -379,7 +379,10 @@ if (PHP_VERSION_ID < 80000) { } } - if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { include("phpvfscomposer://" . $binPathExported); exit(0); }