PHPackages                             ecoapm/libyear - 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. ecoapm/libyear

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

ecoapm/libyear
==============

A simple measure of software dependency freshness

3.0.0(7mo ago)28302.5k↑75%9[1 issues](https://github.com/ecoAPM/php-libyear/issues)[1 PRs](https://github.com/ecoAPM/php-libyear/pulls)MITPHPPHP &gt;=8.1CI passing

Since Jan 22Pushed 2mo ago2 watchersCompare

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

READMEChangelog (9)Dependencies (6)Versions (14)Used By (0)

php-libyear
===========

[](#php-libyear)

A simple measure of dependency freshness

[![Version](https://camo.githubusercontent.com/d959ff765c49c4efcb354f652d00b1fa31b7c7e2243eaee3465e4a793a1ee6ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65636f61706d2f6c6962796561723f6c6f676f3d7061636b6167697374266c6162656c3d496e7374616c6c)](https://packagist.org/packages/ecoAPM/libyear)[![CI](https://github.com/ecoAPM/php-libyear/workflows/CI/badge.svg)](https://github.com/ecoAPM/php-libyear/actions)[![Coverage](https://camo.githubusercontent.com/9abdb3f612ff4e9205d26c21f6d701f7a574e160092aea570e87269c37377b06/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636f41504d5f7068702d6c696279656172266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=ecoAPM_php-libyear)

[![Maintainability Rating](https://camo.githubusercontent.com/630555404f1150f808b871300982fd75d03c70fcb58d96582e2360708ba75f91/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636f41504d5f7068702d6c696279656172266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=ecoAPM_php-libyear)[![Reliability Rating](https://camo.githubusercontent.com/42d63f81dc83b3de90d4f86c54fbf4d980888878a0cb820141bfb37a6af94f87/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636f41504d5f7068702d6c696279656172266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=ecoAPM_php-libyear)[![Security Rating](https://camo.githubusercontent.com/92e5a9bbb514c0ceef8171b7993cc3965f466f9bd886d35a53f81e35ef205419/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636f41504d5f7068702d6c696279656172266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=ecoAPM_php-libyear)

Calculates the total number of years behind their respective newest versions for all dependencies listed in `composer.json`.

Requirements
------------

[](#requirements)

- PHP v8.1 or later
- Composer v2

Ongoing commercial support for legacy versions of PHP is available for [Corporate, Premier, and Title Sponsors](https://github.com/sponsors/ecoAPM).

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

[](#installation)

### Recommended: Composer

[](#recommended-composer)

Run `composer global require ecoapm/libyear` and make sure your global composer directory is in your `$PATH`.

Alternatively, `composer require --dev ecoapm/libyear` will add `libyear` as a local dev dependency for your current directory's app.

### Alternative: PHP Archive (PHAR) File

[](#alternative-php-archive-phar-file)

Download `libyear.phar` from the latest release, and put it in the current directory, or somewhere in your `$PATH` to be able to reference it from anywhere.

### Windows Users

[](#windows-users)

Note that PHP for Windows does not include CA certificates, so you'll need to install them if you haven't done so already:

1. Download  to somewhere permanent (PHP's `extras` directory is a great place)
2. Add `curl.cainfo = "[full path to]\cacert.pem"` to your `php.ini` file

Usage
-----

[](#usage)

`vendor/bin/libyear  [-q|--quiet] [-v|--verbose] [-u|--update]`

(or `php path/to/libyear.phar  [-q|--quiet] [-v|--verbose] [-u|--update]` for the PHAR version)

Arguments:

- `path`: required, directory containing `composer.json` and `composer.lock` files

Options:

- `-h`, `--help`: show help text and exit without checking dependencies
- `-l`, `--limit`: fails if total libyears behind is greater than this value
- `-a`, `--limit-any`: fails if any dependency is more libyears behind than this value
- `-q`, `--quiet`: quiet mode will only output libraries which are not up-to-date (that is, where "Libyears Behind" &gt; 0)
- `-u`, `--update`: update mode will write the latest version info to your `composer.json` file (note that you'll still need to run `composer update` to actually update your local dependencies)
- `-v`, `--verbose`: verbose mode will output processing details like when a library isn't found in a repository

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

[](#contributing)

Please be sure to read and follow ecoAPM's [Contribution Guidelines](CONTRIBUTING.md) when submitting issues or pull requests.

When testing new features and bug fixes, you can run the script via `./libyear { path } [-q]` before building the `phar` file.

To build the `phar` file for final manual testing, run `php -dphar.readonly=0 build.php`. You may wish to run `composer install --no-dev` first to speed up the build process by removing dev dependencies, but will need to reinstall them via `composer install` (specifically, `phpunit` and `mockery` for unit testing).

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 84.4% 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 ~207 days

Recently: every ~272 days

Total

11

Last Release

235d ago

Major Versions

1.0.0 → 2.0.02021-09-15

2.3.0 → 3.0.02025-09-25

PHP version history (3 changes)1.0.0PHP ^7.4

2.0.0PHP &gt;=7.4

3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23425996?v=4)[ecoAPM](/maintainers/ecoAPM)[@ecoAPM](https://github.com/ecoAPM)

---

Top Contributors

[![SteveDesmond-ca](https://avatars.githubusercontent.com/u/195896?v=4)](https://github.com/SteveDesmond-ca "SteveDesmond-ca (76 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (1 commits)")[![prajapati-kaushik](https://avatars.githubusercontent.com/u/10140681?v=4)](https://github.com/prajapati-kaushik "prajapati-kaushik (1 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (1 commits)")

---

Tags

composerdependenciesdependency-managementhacktoberfestlibyearphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ecoapm-libyear/health.svg)

```
[![Health](https://phpackages.com/badges/ecoapm-libyear/health.svg)](https://phpackages.com/packages/ecoapm-libyear)
```

###  Alternatives

[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[inspiredminds/contao-fieldset-duplication

Contao extension to allow the duplication of form fieldsets in the front end by the user for additional input fields.

158.2k1](/packages/inspiredminds-contao-fieldset-duplication)

PHPackages © 2026

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