PHPackages                             olsgreen/composer-bin-dependencies - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. olsgreen/composer-bin-dependencies

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

olsgreen/composer-bin-dependencies
==================================

A composer plugin to check that local binaries / executables are installed and are of the correct version before package install.

2.0(1y ago)29.4k↓31.6%MITPHPPHP &gt;=7.4CI passing

Since Jun 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/olsgreen/composer-bin-dependencies)[ Packagist](https://packagist.org/packages/olsgreen/composer-bin-dependencies)[ RSS](/packages/olsgreen-composer-bin-dependencies/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

Composer Bin(ary) Dependencies
==============================

[](#composer-binary-dependencies)

[![Packagist Version](https://camo.githubusercontent.com/d5037c8addbce9022f471ee9db03d26c4c11fa81bab5f7557a20658d8ea5f863/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6c73677265656e2f636f6d706f7365722d62696e2d646570656e64656e63696573)](https://camo.githubusercontent.com/d5037c8addbce9022f471ee9db03d26c4c11fa81bab5f7557a20658d8ea5f863/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6c73677265656e2f636f6d706f7365722d62696e2d646570656e64656e63696573)[![GitHub license](https://camo.githubusercontent.com/af7ad2d7bd6377dbcb129fc8cfb51791cb54a070931b901c48eff27bce268389/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6c73677265656e2f636f6d706f7365722d62696e2d646570656e64656e63696573)](https://github.com/olsgreen/composer-bin-dependencies)[![Tests](https://github.com/olsgreen/composer-bin-dependencies/workflows/Tests/badge.svg)](https://github.com/olsgreen/composer-bin-dependencies/workflows/Tests/badge.svg)

A composer plugin to check that local binaries / executables are installed and are of the correct version before package install.

**If you require composer 2.x support please use version &gt;= 1.2.**

Composer Bin Dependencies plugin can warn users of these missing dependencies or prevent installation completely.

An example would be a package which relies on `git` being available with a version higher than `2.0`. By requiring this plugin and adding the constraint shown below to you `package.json', you can prevent installation:

```
...
"extra": {
    "binary-dependencies": {
        "require": {
            "git": ">=2.0"
        }
    }
}
...

```

Installation
------------

[](#installation)

```
$ composer require olsgreen/composer-bin-dependencies

```

Usage
-----

[](#usage)

You can validate dependencies are available using either require or warn.

`require` will throw an exception and prevent installation if the constraints are not met.

`warn` simply prints a warning message to the user if the constraints are not met.

```
{
    "require": {
        "olsgreen/composer-bin-dependencies": "dev-master"
    },
    "extra": {
        "binary-dependencies": {
            "require": {
                "git": ">=2.0",
                "ssh": "*"
            },
            "warn": {
                "convert": "
