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.1.2(4w ago)29307.6k—3.2%9[1 issues](https://github.com/ecoAPM/php-libyear/issues)MITPHPPHP ^8.1CI passing

Since Jan 22Pushed 6d 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 2w ago

READMEChangelog (10)Dependencies (18)Versions (22)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

63

—

FairBetter than 99% of packages

Maintenance97

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 82% 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 ~182 days

Recently: every ~328 days

Total

14

Last Release

28d ago

Major Versions

1.0.0 → 2.0.02021-09-15

2.3.0 → 3.0.02025-09-25

PHP version history (4 changes)1.0.0PHP ^7.4

2.0.0PHP &gt;=7.4

3.0.0PHP &gt;=8.1

3.1.2PHP ^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 (82 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 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

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.2k](/packages/statamic-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6943.5M449](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)

PHPackages © 2026

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