explicatis / composer-binary-checker
Composer plugin to require the presence of a binary on the target system
Package info
github.com/explicatis/composer-binary-checker
Type:composer-plugin
pkg:composer/explicatis/composer-binary-checker
Requires
- php: >=8.2
- composer-plugin-api: ^2.0
- symfony/process: ^5.4 || ^6.0 || ^7.0 || ^8.0
Requires (Dev)
- composer/composer: ^2.0
README
Composer plugin to require the presence of a binary on the target system
Installation
composer require explicatis/composer-binary-checker
As with any Composer plugin, Composer will ask you to allow it to execute code on your system:
composer config allow-plugins.explicatis/composer-binary-checker true
Configuring required system binaries
On every composer install and composer update, a check runs to verify
that certain system binaries are available in the PATH. The list of these
binaries is maintained in composer.json under extra.required-binaries:
{
"extra": {
"required-binaries": ["graphicsmagick", "qpdf"]
}
}
To add another binary, simply add its name (as it is invoked on the command line) to this array. If one of the listed binaries is missing on the system, Composer aborts with an error message. These binaries are not installed by Composer and must be provided on the system manually (e.g. via the operating system's package manager).