PHPackages                             dominikb/composer-license-checker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dominikb/composer-license-checker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dominikb/composer-license-checker
=================================

Utility to check for licenses of dependencies and block/allow them.

2.7.0(1y ago)563.8M↓19.9%16[2 PRs](https://github.com/dominikb/composer-license-checker/pulls)7MITPHPPHP ^7.3 || ^8.0CI passing

Since Apr 6Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/dominikb/composer-license-checker)[ Packagist](https://packagist.org/packages/dominikb/composer-license-checker)[ Docs](https://github.com/dominikb/composer-license-checker)[ RSS](/packages/dominikb-composer-license-checker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (18)Used By (7)

Composer License Checker
========================

[](#composer-license-checker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6e06043c4ab4fe52cede281c56e8636782bb356c9a2b4e390f10be38a9ac41da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6d696e696b622f636f6d706f7365722d6c6963656e73652d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dominikb/composer-license-checker)![Build Status](https://camo.githubusercontent.com/8e7c0cc87f1ade16f4d1a5bee4c962433f368fa5ac6278c7bc3dfe6e1c2966ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f646f6d696e696b622f636f6d706f7365722d6c6963656e73652d636865636b65722f72756e2d74657374733f7374796c653d666c61742d737175617265)[![Quality Score](https://camo.githubusercontent.com/72e4170b9065b64de5c476d529aaa98cc4a75bc0b20f5199465a98b1487d37a7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f646f6d696e696b622f636f6d706f7365722d6c6963656e73652d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/dominikb/composer-license-checker)[![Scrutinizer coverage](https://camo.githubusercontent.com/1786853a9993a69d5564132bb973f3f516168a76b3e80e2cc286258a7029d12d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f646f6d696e696b622f636f6d706f7365722d6c6963656e73652d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/dominikb/composer-license-checker)[![Total Downloads](https://camo.githubusercontent.com/b767be1b66235493a3c4c6b2bbdb6d990d0f211cf0c04136b9df1a087e9be6e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f6d696e696b622f636f6d706f7365722d6c6963656e73652d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dominikb/composer-license-checker)

Quickly scan your dependencies, see what licenses they use or check in your CI that no unwanted licenses were merged.

The lookup of the summaries for every license done on .
Please inform yourself in more detail about the licenses you use and do not use the provided summary as your sole information.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require --dev dominikb/composer-license-checker
```

Usage
-----

[](#usage)

Two separate commands are provided:

- `./composer-license-checker check`
- `./composer-license-checker report`

Use `./composer-license-checker help` to get info about general usage or use the syntax `./composer-license-checker help COMMAND_NAME` to see more information about a specific command available.

```
./vendor/bin/composer-license-checker check \
        --allowlist MIT \ # Fail if anything but MIT license is used
        --blocklist GPL \ # Fail if any dependency uses GPL
        --allow dominikb/composer-license-checker # Always allow this dependency regardless of its license

vendor/bin/composer-license-checker report -p /path/to/your/project -c /path/to/composer.phar
```

### Path to composer

[](#path-to-composer)

By default, this tool assumes that "composer" is in your path and a valid command that will call Composer.

If that isn't the case, add the `-c` or `--composer` option with the path where to find Composer instead. This tool comes with Composer installed as a dependency, so you may start with `--composer ./vendor/bin/composer`, given that you are in this tool's root directory when executing a license check.

If this tool cannot find Composer, it will exit with status code 2, see below.

### Exit codes

[](#exit-codes)

Any command returns with one of these exit codes:

- 0: Ok
- 1: Offending licenses found in check, or a problem occurred when creating a report
- 2: Internal error when executing the command, may indicate problems calling Composer internally

### Dependencies without a license

[](#dependencies-without-a-license)

Some dependencies might not have a license specified in their `composer.json`. Those will be grouped under the license `none`.

```
# Reporting a dependency without a license will look like this
./composer-license-checker report --show-packages

#  Count 1 - none (-)
#  +-----+---------+------+
#  | CAN | CAN NOT | MUST |
#  +-----+---------+------+
#
#  packages: somepackage/without-a-license
```

You can add the imagined license `none` to your allowlist or blocklist to handle those dependencies.

```
# Allow dependencies without a license
./composer-license-checker check --allowlist none

# Disallow dependencies without a license
./composer-license-checker check --allowlist GPL --blocklist none
```

### Testing

[](#testing)

```
composer test
```

Code coverage reports are output to the `build` folder. See `.phpunit.xml.dist` for more testing configuration.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Dominik Bauernfeind](https://github.com/dominikb)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance64

Regular maintenance activity

Popularity58

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 73.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~163 days

Recently: every ~120 days

Total

14

Last Release

477d ago

Major Versions

1.0.1 → 2.0.02020-07-07

PHP version history (3 changes)1.0.0PHP ^7.1

2.1.0PHP ^7.3|^8.0

2.6.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/79db2f786337fbf554ce667a0c267d81fe15f1091cb81d0d255c14ac78555a75?d=identicon)[dominikb](/maintainers/dominikb)

---

Top Contributors

[![dominikb](https://avatars.githubusercontent.com/u/28777818?v=4)](https://github.com/dominikb "dominikb (62 commits)")[![SvenRtbg](https://avatars.githubusercontent.com/u/416600?v=4)](https://github.com/SvenRtbg "SvenRtbg (11 commits)")[![Furgas](https://avatars.githubusercontent.com/u/715407?v=4)](https://github.com/Furgas "Furgas (2 commits)")[![ildyria](https://avatars.githubusercontent.com/u/627094?v=4)](https://github.com/ildyria "ildyria (2 commits)")[![keulinho](https://avatars.githubusercontent.com/u/15930605?v=4)](https://github.com/keulinho "keulinho (2 commits)")[![konradmichalik](https://avatars.githubusercontent.com/u/4558190?v=4)](https://github.com/konradmichalik "konradmichalik (1 commits)")[![dkemper](https://avatars.githubusercontent.com/u/1893744?v=4)](https://github.com/dkemper "dkemper (1 commits)")[![KristianI](https://avatars.githubusercontent.com/u/1626966?v=4)](https://github.com/KristianI "KristianI (1 commits)")[![manavo](https://avatars.githubusercontent.com/u/259487?v=4)](https://github.com/manavo "manavo (1 commits)")[![phansys](https://avatars.githubusercontent.com/u/1231441?v=4)](https://github.com/phansys "phansys (1 commits)")

---

Tags

cicomposerhacktoberfestopen-source-licensesdominikbcomposer-license-checker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dominikb-composer-license-checker/health.svg)

```
[![Health](https://phpackages.com/badges/dominikb-composer-license-checker/health.svg)](https://phpackages.com/packages/dominikb-composer-license-checker)
```

###  Alternatives

[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
