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

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

t4web/composer-lock-parser
==========================

OOP reader of composer.lock file.

1.2.0(4y ago)20192.8k↓18.1%87BSD-3-ClausePHPPHP &gt;=5.4.0

Since Oct 8Pushed 3y ago3 watchersCompare

[ Source](https://github.com/t4web/ComposerLockParser)[ Packagist](https://packagist.org/packages/t4web/composer-lock-parser)[ Docs](https://github.com/t4web/ComposerLockParser)[ RSS](/packages/t4web-composer-lock-parser/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (8)Dependencies (1)Versions (10)Used By (7)

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

[](#composer-lock-parser)

OOP reader of composer.lock file

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

[](#introduction)

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

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

[](#requirements)

Features / Goals
----------------

[](#features--goals)

- Create Composer Entity with full general information from composer.lock \[DONE\]
- Create Package Entity with full information about packges \[DONE\]

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

[](#installation)

### Main Setup

[](#main-setup)

```
"require": {
    "t4web/composer-lock-parser": "1.1.*"
}
```

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 Codeception

```
$ codeception run
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~337 days

Recently: every ~478 days

Total

9

Last Release

1567d ago

Major Versions

0.1.0 → 1.0.02014-10-13

### Community

Maintainers

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

---

Top Contributors

[![maxgu](https://avatars.githubusercontent.com/u/208688?v=4)](https://github.com/maxgu "maxgu (19 commits)")[![strausmann](https://avatars.githubusercontent.com/u/4519228?v=4)](https://github.com/strausmann "strausmann (8 commits)")[![fr3nch13](https://avatars.githubusercontent.com/u/7828?v=4)](https://github.com/fr3nch13 "fr3nch13 (5 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

composer.lock reader

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[fidum/nova-package-bundler-command

Improves Laravel Nova initial load speeds by combining all third party package assets into a single file.

2181.4k](/packages/fidum-nova-package-bundler-command)[mfd/ai-filemetadata

Automatically generates FAL metadata for files by means of public LLMs

1150.7k](/packages/mfd-ai-filemetadata)

PHPackages © 2026

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