sllh / composer-lint
Extends the composer validate command with extra rules
Installs: 200 864
Dependents: 8
Suggesters: 0
Security: 0
Stars: 14
Watchers: 3
Forks: 5
Type:composer-plugin
pkg:composer/sllh/composer-lint
Requires
- php: ^7.4 || ^8.0
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- symfony/phpunit-bridge: ^5.2
README
composer-lint is a plugin for Composer.
It extends the composer validate command with extra rules.
Installation
You can install it either globally (recommended):
composer global require sllh/composer-lint
or locally:
composer require sllh/composer-lint
Usage
That's it! Composer will enable automatically the plugin as soon it's installed.
Just run composer validate command to see the plugin working.
Configuration
You can configure the plugin via the COMPOSER_HOME/config.json file. Here is the default one:
{
"config": {
"sllh-composer-lint": {
"php": true,
"type": true,
"minimum-stability": true,
"version-constraints": true
},
"sort-packages": false
}
}
php: Checks if the PHP requirement is set on therequiresection.type: Check if packagetypeis defined.minimum-stability: Checks ifminimum-stabilityis set. It raises an error if it is, except forprojectpackages.version-constraints: Checks if version constraint formats are valid (e.g.~2.0should be^2.0).sort-packages: Checks if packages are sorted on each section. This option is outsidesllh-composer-lintbecause it's a composer native one.