License management plugin for Composer
Go to file
Anton Smirnov be86c479b8 Add chat to the readme 2022-06-07 01:50:13 +03:00
docs Document shortcut config 2022-06-07 01:14:56 +03:00
sandbox Do not remove root package from the pool 2022-06-07 00:21:29 +03:00
src Shortcut config 2022-06-07 01:14:16 +03:00
tests Shortcut config 2022-06-07 01:14:16 +03:00
.gitattributes Tests 2022-06-05 11:27:18 +03:00
.gitignore Document shortcut config 2022-06-07 01:14:56 +03:00
.gitlab-ci.yml Run tests in CI 2022-06-05 13:49:27 +03:00
CHANGELOG.md Trailing space 2022-06-07 01:16:11 +03:00
LICENSE.md Add license 2022-06-05 13:32:43 +03:00
README.md Add chat to the readme 2022-06-07 01:50:13 +03:00
composer.json Declare docs 2022-06-05 13:45:57 +03:00
phpcs.xml Tests 2022-06-05 11:27:18 +03:00
phpunit.xml Tests 2022-06-05 11:27:18 +03:00
psalm.xml Tests 2022-06-05 11:27:18 +03:00

README.md

Composer License Manager

Packagist Packagist Gitlab pipeline status

License management plugin for Composer.

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.

Installation

composer require 'arokettu/composer-license-manager'

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.