License management plugin for Composer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Anton Smirnov 065c81470a Canonicalize attribute order 2 weeks ago
docs Document shortcut config 4 weeks ago
sandbox Do not remove root package from the pool 4 weeks ago
src Shortcut config 4 weeks ago
tests Shortcut config 4 weeks ago
.gitattributes Tests 1 month ago
.gitignore Document shortcut config 4 weeks ago
.gitlab-ci.yml Run tests in CI 1 month ago
CHANGELOG.md Trailing space 4 weeks ago
LICENSE.md Add license 1 month ago
README.md Move installation above 4 weeks ago
composer.json Declare docs 1 month ago
phpcs.xml Tests 1 month ago
phpunit.xml Canonicalize attribute order 2 weeks ago
psalm.xml Tests 1 month ago

README.md

Composer License Manager

Packagist Packagist Gitlab pipeline status

License management plugin for Composer.

Installation

composer require 'arokettu/composer-license-manager'

Features

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

{
    "extras": {
        "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: https://sandfox.dev/php/composer-license-manager.html

Also on Read the Docs: https://composer-license-manager.readthedocs.io/

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/composer-license-manager/-/issues

Feel free to ask any questions in our room on Gitter: https://gitter.im/arokettu/community

License

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