Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arokettu/composer-license-manager

License management plugin for Composer
https://github.com/arokettu/composer-license-manager

composer composer-plugin license license-management licenses

Last synced: 6 days ago
JSON representation

License management plugin for Composer

Awesome Lists containing this project

README

        

# Composer License Manager

[![Packagist](https://img.shields.io/packagist/v/arokettu/composer-license-manager.svg?style=flat-square)](https://packagist.org/packages/arokettu/composer-license-manager)
[![Packagist](https://img.shields.io/packagist/l/arokettu/composer-license-manager.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/sandfox/composer-license-manager/master.svg?style=flat-square)](https://gitlab.com/sandfox/composer-license-manager/-/pipelines)

License management plugin for Composer.

## Installation

```sh
composer require 'arokettu/composer-license-manager'
```

## Features

The plugin is configured in the ``extra`` section of the ``composer.json`` file.

```json
{
"extra": {
"arokettu/composer-license-manager": {
"licenses": {
"allowed": ["MIT", "LGPL-*"],
"forbidden": ["GPL-3.0", "AGPL-*"],
"allow-empty": true
},
"packages": {
"allowed": ["foo/bar", "safenamespace/*"]
},
"enforced": true
}
}
}
```

### Scan for undesired licenses

Run ``composer licenses:scan`` to check installed packages for undesired licenses.

### Policy enforcement

With `"enforced": true` (default setting) the plugin will prevent installation of packages with undesired licenses during `composer install` and `composer update`.

## Documentation

Read full documentation here:

Also on Read the Docs:

## Support

Please file issues on our main repo at GitLab:

Feel free to ask any questions in our room on Gitter:

## License

The library is available as open source under the terms of the [MIT License].

[MIT License]: https://opensource.org/licenses/MIT