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

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

sirix/sirix-config
==================

Utils to load, parse and work with configuration on Mezzio projects

2.0.0(5mo ago)0908↓19.2%2MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jan 28Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/sirix777/sirix-config)[ Packagist](https://packagist.org/packages/sirix/sirix-config)[ Docs](https://github.com/sirix777)[ Fund](https://buymeacoffee.com/sirix)[ GitHub Sponsors](https://github.com/sirix777)[ RSS](/packages/sirix-sirix-config/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (5)Used By (2)

Sirix config
============

[](#sirix-config)

Utils to load, parse and work with configuration on Mezzio projects.

This library is **based on** the [`shlinkio/shlink-config`](https://github.com/shlinkio/shlink-config) project, with some modifications and extensions for our specific requirements.

---

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

[](#installation)

Install this tool using [composer](https://getcomposer.org/).

```
composer install sirix/sirix-config

```

> This library is also a mezzio module which provides its own `ConfigProvider`. Add it to your configuration to get everything automatically set up.

Included utils
--------------

[](#included-utils)

- `loadConfigFromGlob`: Function which expects a glob pattern and loads and merges all config files that match it.
- `EnvVarLoaderProvider`: A config provider which loads the entries of the loaded config into env vars and always returns empty. Designed to be the first config provider in the pipeline.
- `DottedAccessConfigAbstractFactory`: An abstract factory that lets any config param to be fetched as a service by using the `config.foo.bar` notation.
- `ValinorConfigFactory`: A PSR-11 factory that lets you map arbitrary objects from arrays, using [cuyz/valinor](https://github.com/CuyZ/Valinor).

    In order to use it, you have to register the object to map as a service, and the ValinorConfigFactory with static access using the service that returns the raw array with the data as the static method name:

    ```
