PHPackages                             thecodingmachine/yaco-service-provider - 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. thecodingmachine/yaco-service-provider

ActiveLibrary

thecodingmachine/yaco-service-provider
======================================

This package is a bridge between container-intop's service providers and YACO (the PSR-11 compliant container compiler).

1.0.x-dev(10y ago)0291[1 PRs](https://github.com/thecodingmachine/yaco-service-provider/pulls)MITPHPPHP &gt;=7.0

Since Apr 11Pushed 10y ago5 watchersCompare

[ Source](https://github.com/thecodingmachine/yaco-service-provider)[ Packagist](https://packagist.org/packages/thecodingmachine/yaco-service-provider)[ RSS](/packages/thecodingmachine-yaco-service-provider/feed)WikiDiscussions 1.0 Synced 2mo ago

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

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e0d3fd8cd609b44b88c4832eedcf5f75c3445fa9e0e38645eccda8f24d113904/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f7961636f2d736572766963652d70726f76696465722f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/thecodingmachine/yaco-service-provider/?branch=1.0)[![Build Status](https://camo.githubusercontent.com/4f92a52231a67b0e1046be3efac961b78c6ebc671923af9478fe95c6fd35c066/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f7961636f2d736572766963652d70726f76696465722e7376673f6272616e63683d312e30)](https://travis-ci.org/thecodingmachine/yaco-service-provider)[![Coverage Status](https://camo.githubusercontent.com/00c73d02b3bf4ffad4ad1d68727e1b6407bdff8a0eeb950f7d116358ee4fe742/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f7961636f2d736572766963652d70726f76696465722f62616467652e7376673f6272616e63683d312e3026736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/yaco-service-provider?branch=1.0)

Bridge between container-interop's service providers and YACO
=============================================================

[](#bridge-between-container-interops-service-providers-and-yaco)

This package is a bridge between [container-interop's service providers](http://github.com/container-interop/service-provider) and [YACO, the PSR-11 compliant container compiler](http://github.com/thecodingmachine/yaco).

Using this package, you can use Yaco to generate PSR-11 compliant containers that contain the services provided by container-interop's service providers.

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

[](#installation)

```
composer require thecodingmachine/yaco-service-provider
```

Loading a service provider into Yaco
------------------------------------

[](#loading-a-service-provider-into-yaco)

```
use TheCodingMachine\Yaco\Compiler;
use TheCodingMachine\Yaco\ServiceProvider\ServiceProviderLoader;

// Create your YACO compiler.
$compiler = new Compiler();

// Create your service provider loader
$serviceProviderLoader = new ServiceProviderLoader($compiler);

// Load service providers into Yaco:
$serviceProviderLoader->load(MyServiceProvider::class);
$serviceProviderLoader->load(MyOtherServiceProvider::class);

// Services are now available in Yaco, we just need to dump the container:
$code = $compiler->compile('MyContainer');
file_put_contents(__DIR__.'/MyContainer.php', $code);
```

Autodiscovering service providers using Puli
--------------------------------------------

[](#autodiscovering-service-providers-using-puli)

If the service providers you are loading are publishing themselves on Puli, you can easily use Puli's discovery mechanism to load the services:

```
// The discoverAndLoad function takes a Puli discovery instance in parameter.
// It will discover and load service providers automatically.
$serviceProviderLoader->discoverAndLoad($discovery)
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

3682d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (8 commits)")[![xhuberty](https://avatars.githubusercontent.com/u/8350192?v=4)](https://github.com/xhuberty "xhuberty (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thecodingmachine-yaco-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-yaco-service-provider/health.svg)](https://phpackages.com/packages/thecodingmachine-yaco-service-provider)
```

###  Alternatives

[puli/manager

Manages the puli.json file of a Puli project.

6847.9k3](/packages/puli-manager)[puli/cli

A Command Line Interface (CLI) for managing Puli projects.

5147.2k14](/packages/puli-cli)[puli/composer-plugin

Integrates Composer into the Puli package manager.

3868.6k28](/packages/puli-composer-plugin)[mnapoli/simplex

Pimple fork with full container-interop support

13123.1k16](/packages/mnapoli-simplex)

PHPackages © 2026

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