PHPackages                             fr3nch13/composer-lock-parser - 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. fr3nch13/composer-lock-parser

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

fr3nch13/composer-lock-parser
=============================

OOP reader of composer.lock file.

1.0.0(3y ago)02.8k1BSD-3-ClausePHPPHP ~7.4||~8.0

Since Feb 25Pushed 3y agoCompare

[ Source](https://github.com/fr3nch13/ComposerLockParser)[ Packagist](https://packagist.org/packages/fr3nch13/composer-lock-parser)[ Docs](https://github.com/fr3nch13/ComposerLockParser)[ RSS](/packages/fr3nch13-composer-lock-parser/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (4)Used By (1)

Composer.lock Parser
====================

[](#composerlock-parser)

[![Coverage](https://camo.githubusercontent.com/2d3f3d8556500fea0f6714077646333c2293cc6ade1d8ba8ca217c19eaeb6c41/68747470733a2f2f636f6465636f762e696f2f67682f6672336e636831332f436f6d706f7365724c6f636b5061727365722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/fr3nch13/ComposerLockParser)[![Total Downloads](https://camo.githubusercontent.com/daeb35abb042ddc78e67a98137371b64cdd74fc0f9581c028ff3f72ebc144913/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6672336e636831332f636f6d706f7365722d6c6f636b2d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fr3nch13/composer-lock-parser)[![Latest Stable Version](https://camo.githubusercontent.com/8edad230f0d7d24ba81017c53a0d717f60023ff08e187cfb23c8c8572eadf7fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672336e636831332f636f6d706f7365722d6c6f636b2d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fr3nch13/composer-lock-parser)[![GitHub release](https://camo.githubusercontent.com/5eba7d69aa954fe0fed48977f17fe6134755db4e429a24845e670302c96a70e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6672336e636831332f436f6d706f7365724c6f636b5061727365722e737667)](https://GitHub.com/fr3nch13/ComposerLockParser/releases/)

OOP reader of composer.lock file

This is a fork of the original project located at:

Introduction
------------

[](#introduction)

Parse `composer.lock` file and return full information about installed packages in OOP style.

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

[](#requirements)

PHP &gt;= 7.4

TODO
----

[](#todo)

- Add more info to the `Package.php` with info from the `composer.lock`

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

[](#installation)

composer.json:

```
"require": {
    "fr3nch13/composer-lock-parser": "~1.0"
}
```

OR

```
composer require fr3nch13/composer-lock-parser
```

Usage
-----

[](#usage)

Creating ComposerInfo object and getting all of the packages

```
$composerInfo = new \ComposerLockParser\ComposerInfo('/path/to/composer.lock');
// default all packages
$packages = $composerInfo->getPackages();
// or explicitly get all packages
$packages = $composerInfo->getPackages($composerInfo::ALL);

echo $packages[0]->getName();
echo $packages[0]->getVersion();
echo $packages[0]->getNamespace();
```

Getting just production packages.

```
$composerInfo = new \ComposerLockParser\ComposerInfo('/path/to/composer.lock');
$packages = $composerInfo->getPackages($composerInfo::PRODUCTION);
```

Getting just development packages.

```
$composerInfo = new \ComposerLockParser\ComposerInfo('/path/to/composer.lock');
$packages = $composerInfo->getPackages($composerInfo::DEVELOPMENT);
```

Testing
-------

[](#testing)

Tests runs with Phpunit, phpstan, and phpcs I reccommend running `composer ci` before committing your code and pushing it to github. See the `scripts` in `composer.json`.

```
$ composer ci
$ composer test
$ composer cs-check
$ composer phpstan
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

1222d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8db156d8ccab278b11d1d79631bbeb9374b93193d5408fd05417cd3e51ba27f?d=identicon)[fr3nch13](/maintainers/fr3nch13)

---

Top Contributors

[![maxgu](https://avatars.githubusercontent.com/u/208688?v=4)](https://github.com/maxgu "maxgu (18 commits)")[![fr3nch13](https://avatars.githubusercontent.com/u/7828?v=4)](https://github.com/fr3nch13 "fr3nch13 (14 commits)")[![strausmann](https://avatars.githubusercontent.com/u/4519228?v=4)](https://github.com/strausmann "strausmann (8 commits)")[![smalot](https://avatars.githubusercontent.com/u/1424035?v=4)](https://github.com/smalot "smalot (5 commits)")[![tuutti](https://avatars.githubusercontent.com/u/771113?v=4)](https://github.com/tuutti "tuutti (2 commits)")

---

Tags

composercomposer.lockcomposer.json

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fr3nch13-composer-lock-parser/health.svg)

```
[![Health](https://phpackages.com/badges/fr3nch13-composer-lock-parser/health.svg)](https://phpackages.com/packages/fr3nch13-composer-lock-parser)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k315.9M84](/packages/jean85-pretty-package-versions)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.4M2.8k](/packages/ergebnis-composer-normalize)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.9M224](/packages/icanhazstring-composer-unused)[balbuf/composer-git-merge-driver

Custom git merge driver to minimize merge conflicts in composer.json and composer.lock files.

137282.9k](/packages/balbuf-composer-git-merge-driver)[jbzoo/composer-diff

See what has changed after a composer update.

54911.3k1](/packages/jbzoo-composer-diff)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

53024.4M1.1k](/packages/bamarni-composer-bin-plugin)

PHPackages © 2026

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