PHPackages                             xdevor/composer-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. xdevor/composer-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

xdevor/composer-parser
======================

A parser that can parse all the installed PHP packages composer.json file.

v1.5.1(3y ago)026MITPHPPHP ^7.4

Since Mar 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xdevor/composer-parser)[ Packagist](https://packagist.org/packages/xdevor/composer-parser)[ Docs](https://github.com/xdevor/composer-parser)[ RSS](/packages/xdevor-composer-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (7)Used By (0)

ComposerParser
==============

[](#composerparser)

ComposerParser is a PHP package that allows you to parse all the installed PHP packages composer.json file. If you have ever worked with PHP packages, you know how important composer.json is. It describes the package's dependencies, version constraints, and other metadata like providers of laravel app. However, parsing all of the composer.json files in a project can be a tedious and time-consuming task, especially if you are working with multiple packages.

With ComposerParser, you can easily extract information from all of the composer.json files in your project.

 [![Test Status](https://github.com/xdevor/composer-parser/actions/workflows/tests.yml/badge.svg)](https://github.com/xdevor/composer-parser/actions) [![Total Downloads](https://camo.githubusercontent.com/ddf69b98801509305f1aebd2239a9ab33c683affff546beb1fcbb1d4db8e9b69/68747470733a2f2f706f7365722e707567782e6f72672f786465766f722f636f6d706f7365722d7061727365722f642f746f74616c2e737667)](https://packagist.org/packages/xdevor/composer-parser) [![packagist](https://camo.githubusercontent.com/c02321c7fc8912afb266207b22912115e4b63de1f19b9a272da658a6ddd3276c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f786465766f722f636f6d706f7365722d7061727365722e7376673f763d312e352e30)](https://packagist.org/packages/xdevor/composer-parser) [![License](https://camo.githubusercontent.com/51da7c12a6b1d0990e603bd70463275da9178819f499c192ff353422052a6726/68747470733a2f2f706f7365722e707567782e6f72672f786465766f722f636f6d706f7365722d7061727365722f6c6963656e73652e737667)](https://packagist.org/packages/xdevor/composer-parser)

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

[](#installation)

Require this package with composer:

```
composer require xdevor/composer-parser
```

Features
--------

[](#features)

- Supports parsing all installed PHP packages' composer.json files in your project
- Can easily extract specific information of nested composer.json files in your project

Usage
-----

[](#usage)

1. parse specific installed package by key

```
...
use Xdevor\ComposerParser\Parser;
...
(new Parser())->parse('the/package', 'name'); // return name of the package
(new Parser())->parse('the/package', 'authors.0.name'); // return the first author name
(new Parser())->parse('the/package', 'not_exist_key'); // return null if key not exist
(new Parser())->parse('the/package', 'not_exist_key', 'default'); // return 'default' if key not exist
(new Parser(__DIR__ . '/customize/path/installed.json'))->parse('the/package', 'name'); // parse customize path
```

2. parse all installed package by key

```
...
use Xdevor\ComposerParser\Parser;
...
(new Parser())->parseAll($key = 'name'); // return name of all installed PHP packages
(new Parser())->parseAll($key = 'extra.laravel.providers'); // return providers of all installed PHP packages
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Code of Conduct
---------------

[](#code-of-conduct)

In order to ensure that the php community is welcoming to all, please review and abide by the [Code of Conduct](CODE_OF_CONDUCT.md).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](SECURITY.md) on how to report security vulnerabilities.

License
-------

[](#license)

ComposerParser is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

6

Last Release

1149d ago

Major Versions

v0.1.2 → v1.0.02023-03-25

### Community

Maintainers

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

---

Top Contributors

[![xdevor](https://avatars.githubusercontent.com/u/98752059?v=4)](https://github.com/xdevor "xdevor (38 commits)")

---

Tags

composercomposer-packagesinstalled-jsonparserphpcomposerparserpackagesinstalled.json

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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