Skip to content

Commit fbc85de

Browse files
allow chained proxy-binary php-inclusions (#10823)
* allow chained proxy-binary php-inclusion by skipping redundant “phpvfscomposer” stream-wrapper registration
1 parent e3527ea commit fbc85de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Composer/Installer/BinaryInstaller.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,10 @@ public function url_stat(\$path, \$flags)
379379
}
380380
}
381381
382-
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
382+
if (
383+
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
384+
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
385+
) {
383386
include("phpvfscomposer://" . $binPathExported);
384387
exit(0);
385388
}

0 commit comments

Comments
 (0)