PHPackages                             phpactor/config-loader - 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. phpactor/config-loader

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

phpactor/config-loader
======================

Library to load (user) configuration

0.1.2(5y ago)341.5k↑53.3%2[1 issues](https://github.com/phpactor/config-loader/issues)[1 PRs](https://github.com/phpactor/config-loader/pulls)MITPHPPHP ^7.3 || ^8.0

Since Feb 16Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (10)Versions (5)Used By (0)

Config Loader
=============

[](#config-loader)

[![CI](https://github.com/phpactor/config-loader/workflows/CI/badge.svg)](https://github.com/phpactor/config-loader/workflows/CI/badge.svg)

Library to load an application configuration file

Usage
-----

[](#usage)

```
$loader = new ConfigLoader(
    new Deserializers([
        'json' => new JsonDeserializer(),
    ]),
    new PathCandidates([
        new XdgPathCandidate('myapp', 'config.json', 'json'),
        new AbsolutePathCandidate(getcwd() . '/' . 'myapp.json', 'json'),
    ])
);
$config = $loader->load();
```

The above will:

- Load existing config from XDG config directory for `myapp` (e.g. `$HOME/.config/myapp/config.json`).
- Merge existing config from the current working directory if it exists.

Deserializers
-------------

[](#deserializers)

- **JsonDeserializer**: Deserializes using `json_decode`. Very fast.
- **YamlDeserializer**: Deserializes using the Symfony YAML parser requires `symfony/yaml`

Path Candidates
---------------

[](#path-candidates)

- **XdgPathCandidate**: Represents candidate config file in the XDG config path for an application.
- **AbsolutePathCandidate**: Represents an arbitrary config file at an absolute path.

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

[](#contributing)

This package is open source and welcomes contributions! Feel free to open a pull request on this repository.

Support
-------

[](#support)

- Create an issue on the main [Phpactor](https://github.com/phpactor/phpactor) repository.
- Join the `#phpactor` channel on the Slack [Symfony Devs](https://symfony.com/slack-invite) channel.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~360 days

Total

3

Last Release

1927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (39 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phpactor-config-loader/health.svg)

```
[![Health](https://phpackages.com/badges/phpactor-config-loader/health.svg)](https://phpackages.com/packages/phpactor-config-loader)
```

###  Alternatives

[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.8k15.7k](/packages/phpactor-phpactor)[dantleech/fink

Checks Links

2266.3k2](/packages/dantleech-fink)[grasmash/composerize-drupal

Convert a non-Composer managed Drupal application into a Composer-managed application.

12819.4k1](/packages/grasmash-composerize-drupal)[puli/manager

Manages the puli.json file of a Puli project.

6847.9k3](/packages/puli-manager)[chenos/v8js-module-loader

1629.5k1](/packages/chenos-v8js-module-loader)

PHPackages © 2026

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