PHPackages                             flyingmana/composer-config-reader - 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. flyingmana/composer-config-reader

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

flyingmana/composer-config-reader
=================================

a fork of eloquent/composer-config-reader, A light-weight component for reading Composer configuration files.

20.0.1(5y ago)0437.0k↑78.1%11MITPHPPHP &gt;=5.3

Since Oct 17Pushed 5y agoCompare

[ Source](https://github.com/Flyingmana/composer-config-reader)[ Packagist](https://packagist.org/packages/flyingmana/composer-config-reader)[ Docs](https://github.com/eloquent/composer-config-reader)[ RSS](/packages/flyingmana-composer-config-reader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (14)Used By (1)

Composer configuration reader
=============================

[](#composer-configuration-reader)

*A light-weight component for reading Composer configuration files.*

[![Current version image](https://camo.githubusercontent.com/c162e1dfa4f9cc89555bf871c9286e6bd62edaa6eb001ca8fd7f94c01c5e6058/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6f7175656e742f636f6d706f7365722d636f6e6669672d7265616465722e7376673f7374796c653d666c61742d737175617265 "This project uses semantic versioning")](https://packagist.org/packages/eloquent/composer-config-reader)[![Current build status image](https://camo.githubusercontent.com/58f7bfd0f286dc74b446bb3b5d6757e22023e1b8602a4f846d537ee697971d20/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f656c6f7175656e742f636f6d706f7365722d636f6e6669672d7265616465722f6d61737465722e7376673f7374796c653d666c61742d737175617265 "Current build status for the master branch")](https://travis-ci.org/eloquent/composer-config-reader)[![Current coverage status image](https://camo.githubusercontent.com/2441bc26b511eb5cae7ccf7685ae676bb960d01a00eaa59b31d3ef3a7841ed5e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f656c6f7175656e742f636f6d706f7365722d636f6e6669672d7265616465722f6d61737465722e7376673f7374796c653d666c61742d737175617265 "Current test coverage for the master branch")](https://codecov.io/github/eloquent/composer-config-reader)

Installation and documentation
------------------------------

[](#installation-and-documentation)

- Available as [Composer](http://getcomposer.org/) package [eloquent/composer-config-reader](https://packagist.org/packages/eloquent/composer-config-reader).

Usage
-----

[](#usage)

Composer configuration reader is very simple to use, and a quick example should be self-explanatory:

```
$reader = new Eloquent\Composer\Configuration\ConfigurationReader;
$configuration = $reader->read('/path/to/composer.json');

echo $configuration->name(); // outputs the package name
```

Configuration objects
---------------------

[](#configuration-objects)

The following are the objects used to represent the configuration information. For a more detailed overview of the data available, simply look through the class definition (these classes are very simple).

The following classes all exist in the `Eloquent\Composer\Configuration\Element`namespace.

### [Configuration](src/Element/Configuration.php)

[](#configuration)

This is the main configuration object and has methods to access all the information available in the [Composer schema](http://getcomposer.org/doc/04-schema.md).

#### Example methods

[](#example-methods)

- `name()`: The package name.
- `description()`: The package description.
- `dependencies()`: Equivalent to Composer `require`.
- `devDependencies()`: Equivalent to Composer `require-dev`.
- `autoloadPSR0()`: The autoload information for PSR-0 namespaces/paths.
- `autoloadClassmap()`: The autoload information for classmapped paths.

#### Helper methods

[](#helper-methods)

A number of helper methods exist on the main configuration object to simplify the process of extracting useful information:

- `projectName()`: The project name without the vendor prefix.
- `vendorName()`: The vendor name without the project suffix.
- `allDependencies()`: Combines `require` and `require-dev` into a single array.
- `allPSR0SourcePaths()`: A flat array of all PSR-0-compliant source paths.
- `allSourcePaths()`: A flat array of all source paths.

### [Repository](src/Element/Repository.php), [PackageRepository](src/Element/PackageRepository.php)

[](#repository-packagerepository)

These objects describe the package's defined repositories.

All repositories are represented by the `Repository` class, except for package-type repositories which use the `PackageRepository` class.

See [Repositories](http://getcomposer.org/doc/05-repositories.md).

#### Example methods

[](#example-methods-1)

- `type()`: The repository type.
- `url()`: The repository URL (not available for `PackageRepository`).

### [Stability](src/Element/Stability.php)

[](#stability)

This object is an [enumeration](https://github.com/eloquent/enumeration) of package stabilities, with the following members:

- DEV
- ALPHA
- BETA
- RC
- STABLE

It is currently only used to represent the value of the [minimum-stability](http://getcomposer.org/doc/04-schema.md#minimum-stability)option.

### [Author](src/Element/Author.php)

[](#author)

This object contains all information provided for a specific author.

See [authors](http://getcomposer.org/doc/04-schema.md#authors).

#### Example methods

[](#example-methods-2)

- `name()`: The author's name.
- `email()`: The author's email address.

### [SupportInformation](src/Element/SupportInformation.php)

[](#supportinformation)

This object describes the package's support contact information.

See [support](http://getcomposer.org/doc/04-schema.md#support).

#### Example methods

[](#example-methods-3)

- `email()`: The support email address.
- `issues()`: The URL of the issue tracking system.
- `wiki()`: The URL of the wiki system.

### [ProjectConfiguration](src/Element/ProjectConfiguration.php)

[](#projectconfiguration)

This object describes configuration options specific to end-projects, such as the target directories for various resources provided by Composer.

See [config](http://getcomposer.org/doc/04-schema.md#config).

#### Example methods

[](#example-methods-4)

- `vendorDir()`: The project's vendor directory path.
- `binDir()`: The project's binary directory path.

### [ScriptConfiguration](src/Element/ScriptConfiguration.php)

[](#scriptconfiguration)

This object describes the Composer scripts defined by the package.

See [Scripts](http://getcomposer.org/doc/articles/scripts.md).

#### Example methods

[](#example-methods-5)

- `preInstallCmd()`: The pre-install scripts.
- `postInstallCmd()`: The post-install scripts.

### [ArchiveConfiguration](src/Element/ArchiveConfiguration.php)

[](#archiveconfiguration)

This object describes the settings for creating package archives.

See [archive](http://getcomposer.org/doc/04-schema.md#archive).

#### Example methods

[](#example-methods-6)

- `exclude()`: A list of file exclusion patterns.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.2% 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 ~327 days

Recently: every ~399 days

Total

10

Last Release

2018d ago

Major Versions

1.1.2 → 2.0.02014-01-22

2.1.0 → 20.0.02020-11-05

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=5.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/237319?v=4)[Daniel Fahlke](/maintainers/Flyingmana)[@Flyingmana](https://github.com/Flyingmana)

---

Top Contributors

[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (60 commits)")[![Flyingmana](https://avatars.githubusercontent.com/u/237319?v=4)](https://github.com/Flyingmana "Flyingmana (2 commits)")[![spipu](https://avatars.githubusercontent.com/u/10595905?v=4)](https://github.com/spipu "spipu (1 commits)")

---

Tags

composerconfigurationparserreader

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flyingmana-composer-config-reader/health.svg)

```
[![Health](https://phpackages.com/badges/flyingmana-composer-config-reader/health.svg)](https://phpackages.com/packages/flyingmana-composer-config-reader)
```

###  Alternatives

[bcncommerce/json-stream

A bundle of tools to work with JSON in PHP

642.2M3](/packages/bcncommerce-json-stream)[composer-unused/symbol-parser

Toolkit to parse symbols from a composer package

145.7M2](/packages/composer-unused-symbol-parser)[dallgoot/yaml

Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 8.x

43185.8k6](/packages/dallgoot-yaml)[romanpitak/nginx-config-processor

Nginx configuration files processor.

7235.3k1](/packages/romanpitak-nginx-config-processor)

PHPackages © 2026

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