PHPackages                             bnf/service-provider-bridge-bundle - 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. bnf/service-provider-bridge-bundle

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

bnf/service-provider-bridge-bundle
==================================

This Symfony Bundle allows Symfony applications to use service providers as defined in container-interop/service-provider

3.0.0(7y ago)0293MITPHPPHP &gt;=7.1.0

Since Sep 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/bnf/service-provider-bridge-bundle)[ Packagist](https://packagist.org/packages/bnf/service-provider-bridge-bundle)[ RSS](/packages/bnf-service-provider-bridge-bundle/feed)WikiDiscussions master Synced 2mo ago

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

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9685c51149439a191bb0ef73365651b78c13310ce3226f35197253f7ffaa0713/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f626e662f736572766963652d70726f76696465722d6272696467652d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bnf/service-provider-bridge-bundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/e0b164d3bdbf6af70f7a0d9ca7ebf1c64686b45f41d8ca97466dd694f55073f8/68747470733a2f2f7472617669732d63692e6f72672f626e662f736572766963652d70726f76696465722d6272696467652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bnf/service-provider-bridge-bundle)[![Coverage Status](https://camo.githubusercontent.com/5628c7901bbc036f6d66cb2a4718ef25814e261de3e5c8ff13befc3347b7bd01/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f626e662f736572766963652d70726f76696465722d6272696467652d62756e646c652f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/bnf/service-provider-bridge-bundle?branch=master)

container-interop/service-provider bridge bundle
================================================

[](#container-interopservice-provider-bridge-bundle)

Import `service-provider` as defined in `container-interop` into a Symfony application.

*This is a fork of [thecodingmachine/service-provider-bridge-bundle](https://github.com/thecodingmachine/service-provider-bridge-bundle)to support Symfony 4. Credits go to David Négrier.*

Usage
-----

[](#usage)

### Installation

[](#installation)

Add `Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle` in your kernel (the `app/AppKernel.php` file).

**AppKernel.php**

```
    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle()
        ];
        ...
    }
```

### Usage

[](#usage-1)

You have to declare service providers manually in the constructor of the bundle.

**AppKernel.php**

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                new MyServiceProvide1(),
                new MyServiceProvide2()
            ])
        ];
        ...
    }
}
```

Alternatively, you can also pass the service provider class name. This is interesting because the service-provider bundle will not instantiate the service provider unless it is needed for a service. You can therefore improve performances of your application.

**AppKernel.php**

```
    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                MyServiceProvide1::class,
                MyServiceProvide2::class
            ])
        ];
        ...
    }
```

Finally, if you need to pass parameters to the constructors of the service providers, you can do this by passing an array:

**AppKernel.php**

```
    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                [ MyServiceProvide1::class, [ "param1", "param2" ] ],
                [ MyServiceProvide2::class, [ 42 ] ],
            ])
        ];
        ...
    }
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~0 days

Total

3

Last Release

2797d ago

Major Versions

2.0.1 → 3.0.02018-09-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8b7c224af04cc109194abd9d592618e75e05ec95ad86f2e4381b4bd110f99bd?d=identicon)[bnf](/maintainers/bnf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (32 commits)")[![bnf](https://avatars.githubusercontent.com/u/473155?v=4)](https://github.com/bnf "bnf (24 commits)")

---

Tags

symfonycontainer-interopPSR-11service provider

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bnf-service-provider-bridge-bundle/health.svg)

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

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M992](/packages/php-di-php-di)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)

PHPackages © 2026

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