Skip to main content

Module binproxy

Module binproxy 

Source
Expand description

vendor/bin proxies: byte-for-byte port of BinaryInstaller::generateUnixyProxyCode (docs/reference/BinaryInstaller.php). Three shapes: PHP target with shebang (anti-shebang stream wrapper for PHP<8, special phpunit hack), bare PHP target, non-PHP target (sh proxy). Parity is held by the differential test against the proxies generated by Composer in the Laravel fixture (tests/fixtures_binproxy.rs).

Functions§

install_binaries
Installs a package’s proxies (laid out in package_dir) into vendor/bin (0755).
proxy_content
Generates the content of the proxy link (vendor/bin/) to the binary bin (absolute, inside vendor/ or outside it with composer/installers), reading the target’s header. Relative paths are those of BinaryInstaller::installUnixyProxyBinaries (findShortestPath from the proxy file).