PHPackages                             alanvista/php-legal-licenses - 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. alanvista/php-legal-licenses

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

alanvista/php-legal-licenses
============================

A utility to generate a Licenses file containing the full license text for every dependency in your project for legal purposes., fork for https://github.com/Comcast/php-legal-licenses

1.00(3y ago)06Apache-2.0PHP

Since Nov 3Pushed 3y agoCompare

[ Source](https://github.com/alanvista/php-legal-licenses)[ Packagist](https://packagist.org/packages/alanvista/php-legal-licenses)[ Docs](https://github.com/alansslva/php-legal-licenses)[ RSS](/packages/alanvista-php-legal-licenses/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (2)Used By (0)

 [![StyleCI Status](https://camo.githubusercontent.com/00cfdd75a235b6642b88761297263a4f2eb71f3daa7022426cf0491996f9e11e/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130363536393634312f736869656c64)](https://styleci.io/repos/106569641) [![Total Downloads](https://camo.githubusercontent.com/d197758f9e532d3134e66d6e709e55a3353e7f745879e9d9c0356448f1f7e203/68747470733a2f2f706f7365722e707567782e6f72672f636f6d636173742f7068702d6c6567616c2d6c6963656e7365732f642f746f74616c2e737667)](https://packagist.org/packages/comcast/php-legal-licenses) [![Latest Stable Version](https://camo.githubusercontent.com/1a46e9379c8cbe6030379e47b0c25754c207248a432c7bebd8eb352213b510c4/68747470733a2f2f706f7365722e707567782e6f72672f636f6d636173742f7068702d6c6567616c2d6c6963656e7365732f762f737461626c652e737667)](https://packagist.org/packages/comcast/php-legal-licenses) [![License](https://camo.githubusercontent.com/e4f9c95a36d4d5b76305479dcfeba550cb943312b045b27daf4f2fc7dba09e18/68747470733a2f2f706f7365722e707567782e6f72672f636f6d636173742f7068702d6c6567616c2d6c6963656e7365732f6c6963656e73652e737667)](https://packagist.org/packages/comcast/php-legal-licenses)

PHP Legal Licenses
==================

[](#php-legal-licenses)

Legal Licenses is a utility to help generate a single text file containing all of the important information about a project's dependencies. In some organizations, the use of Open Source Software (OSS) is strictly controlled and audited, and requires having every OSS library simply documented.

This utility will generate a `licenses.md` file in the root of your project that contains a list of all dependencies, the currently installed version, commit sha, its description, homepage, list of licenses, and full license text if it is present in the dependency source code directly. It receives this information from the `composer.lock` file, so you must have run a `composer update` or `composer install` at least once in order to use this utility.

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

[](#installation)

If you need a utility such as this for your place of business, chances are, you will need it for more than a single project. Therefore, the easiest and reccommeded way to install this utility is as a global composer package:

```
composer global require comcast/php-legal-licenses
```

Usage
-----

[](#usage)

If you installed php-legal-licenses globally via composer, you should be able to run the script in any of your projects. Note, you must have run either `composer update` or `composer install` at least once, to create a `composer.lock` file.

```
$ cd /path/to/my/project
$ which php-legal-licenses
> ~/.composer/vendor/bin/php-legal-licenses
$ php-legal-licenses generate
> Generating Licenses file...
> Done!

```

You can also hide dependency version with `--hide-version` option:

```
$ php-legal-licenses generate --hide-version

```

You can output csv file with `--csv` option:

```
$ php-legal-licenses generate --csv

```

Or use both option:

```
$ php-legal-licenses generate --hide-version --csv

```

Example Output
--------------

[](#example-output)

Here is a snippet of the licenses file that would be generated for this utility itself:

```
# Project Licenses
This file was generated by the Legal Licenses utility. It contains the name, version and commit sha, description, homepage, and license information for every dependency in this project.

## Dependencies

### psr/log (Version 1.0.2 | 4ebe3a8)
Common interface for logging libraries
Homepage: https://github.com/php-fig/log
Licenses Used: MIT
Copyright (c) 2012 PHP Framework Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

### symfony/console (Version v3.3.6 | b087823)
Symfony Console Component
Homepage: https://symfony.com
Licenses Used: MIT

...

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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

Unknown

Total

1

Last Release

1286d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c9e88ba8fabc137ea6b3144744619483d1f95286a1d49bc42587dabb697cc8c?d=identicon)[alanvista](/maintainers/alanvista)

---

Top Contributors

[![orediggerco](https://avatars.githubusercontent.com/u/7918825?v=4)](https://github.com/orediggerco "orediggerco (21 commits)")[![alanvista](https://avatars.githubusercontent.com/u/117176009?v=4)](https://github.com/alanvista "alanvista (6 commits)")[![akondas](https://avatars.githubusercontent.com/u/8239917?v=4)](https://github.com/akondas "akondas (3 commits)")[![matijaboban](https://avatars.githubusercontent.com/u/14421242?v=4)](https://github.com/matijaboban "matijaboban (2 commits)")[![shooding](https://avatars.githubusercontent.com/u/10529078?v=4)](https://github.com/shooding "shooding (1 commits)")[![dschniepp](https://avatars.githubusercontent.com/u/1108670?v=4)](https://github.com/dschniepp "dschniepp (1 commits)")[![gpupo](https://avatars.githubusercontent.com/u/126154?v=4)](https://github.com/gpupo "gpupo (1 commits)")[![JohnRiv](https://avatars.githubusercontent.com/u/614632?v=4)](https://github.com/JohnRiv "JohnRiv (1 commits)")

---

Tags

licenseutilitybinarylicenseslegal

### Embed Badge

![Health badge](/badges/alanvista-php-legal-licenses/health.svg)

```
[![Health](https://phpackages.com/badges/alanvista-php-legal-licenses/health.svg)](https://phpackages.com/packages/alanvista-php-legal-licenses)
```

###  Alternatives

[comcast/php-legal-licenses

A utility to generate a Licenses file containing the full license text for every dependency in your project for legal purposes.

821.1M9](/packages/comcast-php-legal-licenses)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)

PHPackages © 2026

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