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

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

jdarwood007/license-detector
============================

License Type Detector

v1.1.1(1y ago)0457MITPHPPHP &gt;=8.1.0CI failing

Since Aug 24Pushed 1y agoCompare

[ Source](https://github.com/jdarwood007/license-detector)[ Packagist](https://packagist.org/packages/jdarwood007/license-detector)[ Docs](https://sycho9.github.io)[ RSS](/packages/jdarwood007-license-detector/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (10)Used By (0)

license-detector
================

[](#license-detector)

A License information detector, inspired by [Licensee](https://github.com/licensee/licensee) and relies on data from [`choosealicense.com`](https://choosealicense.com/)

[![Build-cs](https://camo.githubusercontent.com/0e9aa57180bc8e2fcd4637e32442cbce9b3eabd7ec098b99fe517218201a7990/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a646172776f6f643030372f6c6963656e73652d6465746563746f722f7068702d63732d6669786572)](https://camo.githubusercontent.com/0e9aa57180bc8e2fcd4637e32442cbce9b3eabd7ec098b99fe517218201a7990/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a646172776f6f643030372f6c6963656e73652d6465746563746f722f7068702d63732d6669786572)[![Build](https://camo.githubusercontent.com/4c2fce21838bf0c16d89b1138e48879ff741f2134a2db631a24873c33ce7b17f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a646172776f6f643030372f6c6963656e73652d6465746563746f722f706870)](https://camo.githubusercontent.com/4c2fce21838bf0c16d89b1138e48879ff741f2134a2db631a24873c33ce7b17f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a646172776f6f643030372f6c6963656e73652d6465746563746f722f706870)[![Latest Version](https://camo.githubusercontent.com/4081885b15994a1a9bc5486639305ff4b4d87380371adf0509f3bf698c79adcc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a646172776f6f643030372f6c6963656e73652d6465746563746f722e7376673f7374796c653d666c61742d73717561726526636f6c6f723d6f72616e6765)](https://camo.githubusercontent.com/4081885b15994a1a9bc5486639305ff4b4d87380371adf0509f3bf698c79adcc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a646172776f6f643030372f6c6963656e73652d6465746563746f722e7376673f7374796c653d666c61742d73717561726526636f6c6f723d6f72616e6765)[![php](https://camo.githubusercontent.com/2f559f8368d89930229983e039c3fb744437cb4b72a0da565a16e56c7031f928/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e302d7265642e7376673f7374796c653d666c61742d73717561726526636f6c6f723d626c7565)](https://camo.githubusercontent.com/2f559f8368d89930229983e039c3fb744437cb4b72a0da565a16e56c7031f928/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e302d7265642e7376673f7374796c653d666c61742d73717561726526636f6c6f723d626c7565)[![License](https://camo.githubusercontent.com/832d96619790ca78f6414bfe9b7fb5f14a0715f6058706a4e614c2b2b98e9a10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d73717561726526636f6c6f723d677265656e)](https://camo.githubusercontent.com/832d96619790ca78f6414bfe9b7fb5f14a0715f6058706a4e614c2b2b98e9a10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d73717561726526636f6c6f723d677265656e)

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

[](#installation)

Using Composer run the following

```
$ composer require jdarwood007/license-detector
```

Problem
-------

[](#problem)

The code uses php's `similar_text()` function to tell which license is the one used, the function is quiet expensive and can take up to one second for the results.

Usage
-----

[](#usage)

Using the `Detector` class's `parse()` or `parseByPath()` methods, you get a `License` object containing data about the license

```
require '...\vendor\autoload.php';

use LicenseDetector\Detector;

$detector = new Detector();

// By license contents
$license = $detector->parse($contents);

// By file path
$license = $detector->parseByPath($path_to_license);
```

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

[](#contributing)

Sign-off your commits, to acknowledge your submission under the license of the project.

Example: `Signed-off-by: Your Name `

License
-------

[](#license)

This package is released under the MIT License. A full copy of this license is included in the package file.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance46

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 52% 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 ~262 days

Recently: every ~524 days

Total

9

Last Release

406d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.2.0

v1.1.0PHP &gt;=8.0.2

v1.1.1PHP &gt;=8.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/732116?v=4)[Jeremy D](/maintainers/jdarwood007)[@jdarwood007](https://github.com/jdarwood007)

---

Top Contributors

[![jdarwood007](https://avatars.githubusercontent.com/u/732116?v=4)](https://github.com/jdarwood007 "jdarwood007 (26 commits)")[![SychO9](https://avatars.githubusercontent.com/u/20267363?v=4)](https://github.com/SychO9 "SychO9 (24 commits)")

---

Tags

phplicense

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jdarwood007-license-detector/health.svg)

```
[![Health](https://phpackages.com/badges/jdarwood007-license-detector/health.svg)](https://phpackages.com/packages/jdarwood007-license-detector)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[altis/local-server

Local Server module for Altis

18221.6k3](/packages/altis-local-server)

PHPackages © 2026

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