Distribute PHPacker binaries via Composer
To distribute binaries that automatically select the correct version based on the user's platform and architecture, use the phpacker/composer-installer plugin. This plugin replaces the need for a manual bin section in composer.json by using the phpacker.json configuration file to discover executables and create a platform-specific proxy.
On Windows, the installer automatically generates a .bat file and a Unix-style proxy file to ensure compatibility with Windows, WSL, and Linux VMs.
# Install the plugin as a regular dependency (not a dev-dependency)
composer require phpacker/composer-installer