Skip to content

Commit

Permalink
allow chained proxy-binary php-inclusions (#10823)
Browse files Browse the repository at this point in the history
* allow chained proxy-binary php-inclusion by skipping redundant “phpvfscomposer” stream-wrapper registration
  • Loading branch information
brandung-sjorek authored Jun 6, 2022
1 parent e3527ea commit fbc85de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Composer/Installer/BinaryInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,10 @@ public function url_stat(\$path, \$flags)
}
}
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);
}
Expand Down

0 comments on commit fbc85de

Please sign in to comment.