PHPackages                             phly/zend-servicemanager-interop - 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. phly/zend-servicemanager-interop

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

phly/zend-servicemanager-interop
================================

Providing service-provider compilation for zend-servicemanager

110PHP

Since Aug 17Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/phly/zend-servicemanager-interop)[ Packagist](https://packagist.org/packages/phly/zend-servicemanager-interop)[ RSS](/packages/phly-zend-servicemanager-interop/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

servicemanager-interop
======================

[](#servicemanager-interop)

> ⚠️ **Archived 2025-08-17**
>
> Use at your own risk.

[![Build Status](https://camo.githubusercontent.com/0ef9ef090e23599c0dda5abfc632ff86530f216685f282c790bda54861c2ed18/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f70686c792f7a656e642d736572766963656d616e616765722d696e7465726f702e7376673f6272616e63683d6d6173746572)](https://secure.travis-ci.org/phly/zend-servicemanager-interop)[![Coverage Status](https://camo.githubusercontent.com/3e3d94c327e37d4e5c632c13a5b7096c7fb95fda3e0890954ed2385b85883cba/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f70686c792f7a656e642d736572766963656d616e616765722d696e7465726f702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/phly/zend-servicemanager-interop?branch=master)

Use [container-interop service providers](https://github.com/container-interop/service-provider/)with [zend-servicemanager](https://zendframework.github.io/zend-servicemanager/).

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

[](#installation)

```
$ composer require phly/zend-servicemanager-interop
```

Usage
-----

[](#usage)

```
use Zend\ServiceManager\Interop\ConfigInjector;
use Zend\ServiceManager\Interop\ProviderAggregate;
use Zend\ServiceManager\ServiceManager;

// Get a list of service provider classes and aggregate them:
$aggregate = new ProviderAggregate();
foreach (include 'providers.php' as $provider) {
    $aggregate->enqueue($provider);
}

// Create and inject a service manager with the providers:
$container = (new ConfigInjector())->inject($aggregate, new ServiceManager());
```

Internals
---------

[](#internals)

- `ProviderAggregate` allows passing either a class name of a provider, or an instance. Internally, it creates instances from class names to ensure that dequeued items are known-good types.
- `ConfigInjector` will create a closure around factories, to curry arguments and ensure the factories have no conflicts with how zend-servicemanager invokes them.
- `ConfigInjector` adds factories as delegators if the service is already present in the zend-servicemanager instance. Again, the factory is wrapped in a closure in order to curry arguments in the correct order.

Differences from service-provider
---------------------------------

[](#differences-from-service-provider)

This implementation experiments a bit and allows the following as factory arguments:

- any valid PHP callable
- FQCN arguments that resolve to functors

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25943?v=4)[Matthew Weier O'Phinney](/maintainers/weierophinney)[@weierophinney](https://github.com/weierophinney)

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (8 commits)")

### Embed Badge

![Health badge](/badges/phly-zend-servicemanager-interop/health.svg)

```
[![Health](https://phpackages.com/badges/phly-zend-servicemanager-interop/health.svg)](https://phpackages.com/packages/phly-zend-servicemanager-interop)
```

PHPackages © 2026

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