Enforce a minimum Composer version for your team

Installs: 60 059

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 3

Forks: 3

Open Issues: 3


0.5.0 2022-12-10 15:28 UTC



I judge your Composer to be insufficent

CircleCI Maintainability Test Coverage Packagist


We've worked on many projects with larger teams where developers end up with multiple versions of composer all over their local environments. This plugin will ensure that composer version warnings can't be ignored by developers, which is especially useful when developers need to run composer update.


$ composer global require deviantintegral/composer-gavel

Add plugin to your project and update other dependencies

  1. $ composer require --dev deviantintegral/composer-gavel
  2. $ composer update

Add without updating anything

  1. $ composer require --dev deviantintegral/composer-gavel
  2. Update the composer.lock hash with $ composer update --lock.

When the running composer version does not satisfy the constraint, an error will be thrown.

gavel error

It's recommended to require this plugin on a per-project basis as well as globally. If the plugin is not globally installed, then the version check will not run during the very first composer install or update. The per-project requirement ensures that the plugin is activated after the initial install. The composer version is a root-only key and is not used in dependencies.