PHPackages                             sandrokeil/interop-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. sandrokeil/interop-config

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

sandrokeil/interop-config
=========================

Provides interfaces and a concrete implementation to create instances depending on configuration via factory classes and ensures a valid config structure. It can also be used to auto discover factories and to create configuration files.

2.2.0(5y ago)58446.7k↓21.9%9[1 PRs](https://github.com/sandrokeil/interop-config/pulls)20BSD-3-ClausePHPPHP ^7.1 || ^8.0

Since Sep 5Pushed 5y ago9 watchersCompare

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

READMEChangelog (9)Dependencies (8)Versions (12)Used By (20)

Interoperability Configuration
==============================

[](#interoperability-configuration)

> You want to configure your factories?

> You want to reduce your factory boilerplate code?

> You want to check automatically for mandatory options or merge default options?

> You want to have a valid config structure?

> You want to generate your configuration files from factory classes?

> This library comes to the rescue!

[![Build Status](https://camo.githubusercontent.com/40326a178cec225d9c8fbbaff797b35dea19b12acbe33c9bc4b19197f2057516/68747470733a2f2f7472617669732d63692e6f72672f73616e64726f6b65696c2f696e7465726f702d636f6e6669672e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/sandrokeil/interop-config)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/23331e5303ddef353409ad94d5b7a84e26e91abae031bd8860c024c4c14b47fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616e64726f6b65696c2f696e7465726f702d636f6e6669672f6261646765732f7175616c6974792d73636f72652e706e673f733d63646566313631633134313536653365333665643063653364366664373937396433386439313663)](https://scrutinizer-ci.com/g/sandrokeil/interop-config/)[![Coverage Status](https://camo.githubusercontent.com/280c9701a15422653dcf38cd4f294752210ed08ea96d07280b45b0db6b1671d3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f73616e64726f6b65696c2f696e7465726f702d636f6e6669672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/sandrokeil/interop-config?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/863b1a3cc11794477dee4513cdbb9525fc93851ac178086ceb2e86d6db0ded9e/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f696e7465726f702d636f6e6669672f762f737461626c652e706e67)](https://packagist.org/packages/sandrokeil/interop-config)[![Total Downloads](https://camo.githubusercontent.com/91d79a9a1a894be553451f9a336d21c65929ea8dae8d9a183cf987dc690fa749/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f696e7465726f702d636f6e6669672f646f776e6c6f6164732e706e67)](https://packagist.org/packages/sandrokeil/interop-config)[![License](https://camo.githubusercontent.com/99f29d235a9b40a4d7cb0747cb72e994654847354388aa352d43308d7af67ec9/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f696e7465726f702d636f6e6669672f6c6963656e73652e706e67)](https://packagist.org/packages/sandrokeil/interop-config)

`interop-config` provides interfaces and a concrete implementation to create instances depending on configuration via factory classes and ensures a valid config structure. It can also be used to auto discover factories and to create configuration files.

- **Well tested.** Besides unit test and continuous integration/inspection this solution is also ready for production use.
- **Framework agnostic** This PHP library does not depends on any framework but you can use it with your favourite framework.
- **Every change is tracked**. Want to know whats new? Take a look at [CHANGELOG.md](https://github.com/sandrokeil/interop-config/blob/master/CHANGELOG.md)
- **Listen to your ideas.** Have a great idea? Bring your tested pull request or open a new issue. See [CONTRIBUTING.md](CONTRIBUTING.md)

You should have coding conventions and you should have config conventions. If not, you should think about that. `interop-config` is universally applicable! See further [documentation](http://sandrokeil.github.io/interop-config/ "Latest interop-config documentation") for more details.

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

[](#installation)

The suggested installation method is via composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

Run `composer require sandrokeil/interop-config` to install interop-config. Version `1.x` is for PHP &lt; 7.1 and Version `2.x` is for PHP &gt;= 7.1.

Documentation
-------------

[](#documentation)

For the latest online documentation visit [http://sandrokeil.github.io/interop-config/](http://sandrokeil.github.io/interop-config/ "Latest interop-config documentation"). Refer the *Quick Start* section for a detailed explanation.

Documentation is [in the doc tree](doc/), and can be compiled using [bookdown](http://bookdown.io) or [Docker](https://www.docker.com/)

```
$ docker run -it --rm -v $(pwd):/app sandrokeil/bookdown doc/bookdown.json
$ docker run -it --rm -p 8080:8080 -v $(pwd):/app php:7.1-cli php -S 0.0.0.0:8080 -t /app/doc/html
```

or run *bookdown*

```
$ ./vendor/bin/bookdown doc/bookdown.json
$ php -S 0.0.0.0:8080 -t doc/html/
```

Then browse to

Projects
--------

[](#projects)

This is a list of projects who are using `interop-config` interfaces ([incomplete](https://packagist.org/packages/sandrokeil/interop-config/dependents)).

- [prooph/service-bus](https://github.com/prooph/service-bus) - PHP Lightweight Message Bus supporting CQRS
- [prooph/event-store](https://github.com/prooph/event-store) - PHP EventStore Implementation
- [prooph/snapshot-store](https://github.com/prooph/snapshot-store) - Simple and lightweight snapshot store
- [prooph/psr7-middleware](https://github.com/prooph/psr7-middleware) - PSR-7 Middleware for prooph components

Benchmarks
----------

[](#benchmarks)

The benchmarks uses [PHPBench](http://phpbench.readthedocs.org/en/latest/) and can be started by the following command:

```
$ ./vendor/bin/phpbench run -v --report=table
```

or with [Docker](https://www.docker.com/)

```
$ docker run --rm -it --volume $(pwd):/app prooph/php:7.1-cli-opcache php ./vendor/bin/phpbench run --report=table
```

You can use the `group` and `filter` argument to get only results for a specific group/filter.

These groups are available: `perf`, `config`, `configId`, `mandatory`, `mandatoryRev` and `default`

These filters are available: `can`, `options` and `fallback`

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% 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 ~202 days

Recently: every ~342 days

Total

10

Last Release

2081d ago

Major Versions

0.3.1 → 1.0.02016-03-05

1.0.0 → 2.0.02016-12-06

1.x-dev → 2.0.12016-12-09

PHP version history (4 changes)0.1.0PHP &gt;=5.5

1.0.0PHP ^5.5 || ^7.0

2.0.0PHP ^7.1

2.2.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f3428ea5d86dde45a70842c5228d295ec37a493594d484bf1ed2552e85b791?d=identicon)[sandrokeil](/maintainers/sandrokeil)

---

Top Contributors

[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (139 commits)")[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![tobiju](https://avatars.githubusercontent.com/u/14201950?v=4)](https://github.com/tobiju "tobiju (1 commits)")

---

Tags

configconfigurationfactoryinteropoptionsphpphp7servicestructurephpinterfacesfactoryconfigurationconfigoptionsservicestandardinterop

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sandrokeil-interop-config/health.svg)

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

###  Alternatives

[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.2k1](/packages/m1-vars)[sandrokeil/easy-config

Zend Framework 2 (zf2) module to retrieve specific module options and provides some abstract factories to create easily instances depending on configuration

113.1k1](/packages/sandrokeil-easy-config)

PHPackages © 2026

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