PHPackages                             ergebnis/license - 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. ergebnis/license

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

ergebnis/license
================

Provides an abstraction of an open-source license.

2.7.0(8mo ago)142.4M—6%120MITPHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

Since Jan 19Pushed 1mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (15)Versions (19)Used By (20)

license
=======

[](#license)

[![Integrate](https://github.com/ergebnis/license/workflows/Integrate/badge.svg)](https://github.com/ergebnis/license/actions)[![Merge](https://github.com/ergebnis/license/workflows/Merge/badge.svg)](https://github.com/ergebnis/license/actions)[![Release](https://github.com/ergebnis/license/workflows/Release/badge.svg)](https://github.com/ergebnis/license/actions)[![Renew](https://github.com/ergebnis/license/workflows/Renew/badge.svg)](https://github.com/ergebnis/license/actions)

[![Code Coverage](https://camo.githubusercontent.com/5de2b3dd83b404fdf034b7dca98bac7b8cce3f10db566ad612cce8d053594377/68747470733a2f2f636f6465636f762e696f2f67682f65726765626e69732f6c6963656e73652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ergebnis/license)

[![Latest Stable Version](https://camo.githubusercontent.com/28de60aebad3544a448106693c3d2f1ac84bdfe18d396e13a657f340fcf9baa4/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f6c6963656e73652f762f737461626c65)](https://packagist.org/packages/ergebnis/license)[![Total Downloads](https://camo.githubusercontent.com/c815a1346f6ab00950b5299be600b8b74c4e13b9521c165c24de0103281adbd1/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f6c6963656e73652f646f776e6c6f616473)](https://packagist.org/packages/ergebnis/license)[![Monthly Downloads](https://camo.githubusercontent.com/b64f5f6aabec599aa57c72085675eb5ccaaf0e9cbc32f827ed70874689d0db92/687474703a2f2f706f7365722e707567782e6f72672f65726765626e69732f6c6963656e73652f642f6d6f6e74686c79)](https://packagist.org/packages/ergebnis/license)

This project provides a [`composer`](https://getcomposer.org) package with an abstraction of an open-source license.

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

[](#installation)

Run

```
composer require --dev ergebnis/license
```

Usage
-----

[](#usage)

Sometimes open source maintainers complain about the burden of managing an open-source project. Sometimes they argue that contributors opening pull requests to update license years unnecessarily increase their workload.

Of course, all of this can be automated, can't it?

### Configuration for `friendsofphp/php-cs-fixer`

[](#configuration-for-friendsofphpphp-cs-fixer)

With [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) you can use the configuration file `.php-cs-fixer.php` to

- save the license to a file, e.g. `LICENSE` or `LICENSE.md`
- specify a file-level header using the `header_comment` fixer that will be replaced in PHP files

Here's an example of a `.php-cs-fixer.php` file for an open-source project using the [`MIT`](src/Type/MIT.php) license type:

```
