arokettu / composer-license-manager
License management plugin for Composer
Installs: 182 223
Dependents: 0
Suggesters: 0
Security: 0
Stars: 59
Watchers: 2
Forks: 0
Type:composer-plugin
pkg:composer/arokettu/composer-license-manager
Requires
- php: ^8.1
- composer-plugin-api: ^2.3
Requires (Dev)
- composer/composer: ^2.3
- phpunit/phpunit: ^10.4.2
- sandfox.dev/code-standard: ^1.2023.06.29
- squizlabs/php_codesniffer: *
- vimeo/psalm: ^5.16
This package is auto-updated.
Last update: 2025-10-01 20:47:33 UTC
README
License management plugin for Composer.
Installation
composer require 'arokettu/composer-license-manager'
Features
The plugin is configured in the extra section of the composer.json file.
{
    "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: 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.