PHPackages                             elgg/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. elgg/composer-config-reader

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

elgg/composer-config-reader
===========================

A light-weight component for reading Composer configuration files.

01.9k1PHP

Since Dec 12Pushed 5mo agoCompare

[ Source](https://github.com/Elgg/composer-config-reader)[ Packagist](https://packagist.org/packages/elgg/composer-config-reader)[ RSS](/packages/elgg-composer-config-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

> # No longer maintained
>
> [](#no-longer-maintained)
>
> This package is no longer maintained. See \[this statement\] for more info.
>
> \[this statement\]:  Phony for PHPUnit

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

24

—

LowBetter than 32% of packages

Maintenance49

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.4% 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.

### Community

Maintainers

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

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

---

Top Contributors

[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (64 commits)")[![jeabakker](https://avatars.githubusercontent.com/u/881958?v=4)](https://github.com/jeabakker "jeabakker (3 commits)")[![jdalsem](https://avatars.githubusercontent.com/u/861833?v=4)](https://github.com/jdalsem "jdalsem (2 commits)")[![spipu](https://avatars.githubusercontent.com/u/10595905?v=4)](https://github.com/spipu "spipu (1 commits)")

### Embed Badge

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

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

###  Alternatives

[xobotyi/rsync

rsync wrapper library for php

9732.3k1](/packages/xobotyi-rsync)

PHPackages © 2026

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