PHPackages                             teknoo/bridge-phpdi-symfony - 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. teknoo/bridge-phpdi-symfony

ActiveLibrary

teknoo/bridge-phpdi-symfony
===========================

Userfriendly integration of PHP-DI with Symfony, Fork from php-di/symfony-bridge

7.1.2(5mo ago)229.1k—8.3%10BSD-3-ClausePHPPHP ^8.4

Since Sep 9Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/TeknooSoftware/bridge-phpdi-symfony)[ Packagist](https://packagist.org/packages/teknoo/bridge-phpdi-symfony)[ Docs](https://teknoo.software/libraries/php-di-symfony-bridge)[ GitHub Sponsors](https://github.com/sponsors/TeknooSoftware)[ Patreon](https://www.patreon.com/teknoo_software)[ RSS](/packages/teknoo-bridge-phpdi-symfony/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (46)Used By (10)

Teknoo Software - PHP-DI integration with Symfony
=================================================

[](#teknoo-software---php-di-integration-with-symfony)

[![Latest Stable Version](https://camo.githubusercontent.com/3fe6990a1cd8ef188ec502ac9ad4445fe066c84e5d76087fa5696d7df64a2e23/68747470733a2f2f706f7365722e707567782e6f72672f74656b6e6f6f2f73796d666f6e792d6272696467652f762f737461626c65)](https://packagist.org/packages/teknoo/symfony-bridge)[![Latest Unstable Version](https://camo.githubusercontent.com/b7b88b8fe1cb2663867d39173c0ba84521c4bb4a88523272b4f2ce2d41b156ab/68747470733a2f2f706f7365722e707567782e6f72672f74656b6e6f6f2f73796d666f6e792d6272696467652f762f756e737461626c65)](https://packagist.org/packages/teknoo/symfony-bridge)[![Total Downloads](https://camo.githubusercontent.com/4f9e810a3daac2ad39ac609349368788763015083117d4d6322adac32c88f7cd/68747470733a2f2f706f7365722e707567782e6f72672f74656b6e6f6f2f73796d666f6e792d6272696467652f646f776e6c6f616473)](https://packagist.org/packages/teknoo/symfony-bridge)[![License](https://camo.githubusercontent.com/8ab4490f3f61af34c1596b8c772ce3ea22d7ab43199ca4c6bcdccbb447ab32ff/68747470733a2f2f706f7365722e707567782e6f72672f74656b6e6f6f2f73796d666f6e792d6272696467652f6c6963656e7365)](https://packagist.org/packages/teknoo/symfony-bridge)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

This package provides integration for PHP-DI with Symfony. [PHP-DI](http://php-di.org) is a dependency injection container for PHP. This bridge works as Symfony Bundle to integrate PHP-DI, into the Symfony Container, as factory for entries defined into PHP-DI. Unlike the official bridge, this bridge does not require to use a custom version of Symfony's Kernel, neither a custom version of Symfony's container. During Symfony container's compilation, all entries in PHP-DI will be referenced into Symfony's Container. The bridge will also implements the PSR Container interface *`(PSR-11)`* to act as an interface with Symfony Container in PHP-DI factory. They will directly call the Symfony Container instead of PHP-DI, The bridge will also automatically manage the management
of the parameters, managed differently by Symfony.

Install this bridge
-------------------

[](#install-this-bridge)

**If you use a previous version of PHP-DI Bridge, remove PHP-DI Kernel overload and use the default kernel**

- Add to you `bundles.php` file

    ```
      Teknoo\DI\SymfonyBridge\DIBridgeBundle::class => ['all' => true],

    ```
- Create the file `di_bridge.yaml` in your config folder and put in

    ```
      di_bridge:
        #To enable PHP-DI's container compilation (disable by default)
        compilation_path: ~ #Default, or path to store cache, like '%kernel.project_dir%/var/cache/phpdi'
        #To enable PHP-DI's cache (disable by default)
        enable_cache: false #Default or true
        definitions:
          - 'list of PHP-DI definitions file, you can use Symfony joker like %kernel.project_dir%'
          #example
          - '%kernel.project_dir%/vendor/editor_name/package_name/src/di.php'
          - '%kernel.project_dir%/config/di.php'
        import:
          #To make alias from SF entries into PHPDI
          My\Class\Name: 'symfony.contaner.entry.name'

    ```

Support this project
--------------------

[](#support-this-project)

This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on [Patreon](https://patreon.com/teknoo_software) or [Github](https://github.com/sponsors/TeknooSoftware).

Thanks :) Richard.

Credits
-------

[](#credits)

EIRL Richard Déloge -  - Lead developer. SASU Teknoo Software -

About Teknoo Software
---------------------

[](#about-teknoo-software)

**Teknoo Software** is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.

License
-------

[](#license)

This library is licensed under the 3-Clause BSD License - see the licenses folder for details.

Installation &amp; Requirements
-------------------------------

[](#installation--requirements)

To install this library with composer, run this command :

```
composer require teknoo/bridge-phpdi-symfony

```

This library requires :

```
* PHP 8.1+
* A PHP autoloader (Composer is recommended)
* PHP-DI.
* Symfony/dependency-injection 5.4 or 6.2+.
* Symfony/http-kernel 5.4 or 6.2+.
* Symfony/config 6.3, 6.4 or 7+.

```

Contribute :)
-------------

[](#contribute-)

You are welcome to contribute to this project. [Fork it on Github](CONTRIBUTING.md)

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance78

Regular maintenance activity

Popularity30

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 72.6% 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 ~45 days

Recently: every ~76 days

Total

43

Last Release

161d ago

Major Versions

4.1.1 → 5.0.02021-03-20

5.2.6 → 6.0.0-beta12023-07-12

6.1.1 → 7.0.02025-08-05

PHP version history (7 changes)4.0.0-beta3PHP ~7.4

4.0.3PHP ~7.4||~8.0

5.0.0PHP ~8.0

5.0.7PHP ^8.0

5.2.0PHP ^8.1

6.1.0-beta1PHP ^8.2

7.0.0PHP ^8.4

### Community

Maintainers

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

---

Top Contributors

[![frenchcomp](https://avatars.githubusercontent.com/u/1397905?v=4)](https://github.com/frenchcomp "frenchcomp (170 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (60 commits)")[![avant1](https://avatars.githubusercontent.com/u/2902785?v=4)](https://github.com/avant1 "avant1 (1 commits)")[![jasonbouffard](https://avatars.githubusercontent.com/u/181576?v=4)](https://github.com/jasonbouffard "jasonbouffard (1 commits)")[![safigo](https://avatars.githubusercontent.com/u/566026?v=4)](https://github.com/safigo "safigo (1 commits)")[![tyx](https://avatars.githubusercontent.com/u/245494?v=4)](https://github.com/tyx "tyx (1 commits)")

---

Tags

symfonydiBridgephpdi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/teknoo-bridge-phpdi-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/teknoo-bridge-phpdi-symfony/health.svg)](https://phpackages.com/packages/teknoo-bridge-phpdi-symfony)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)[tilleuls/url-signer-bundle

Create and validate signed URLs with a limited lifetime in Symfony

81340.1k](/packages/tilleuls-url-signer-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)

PHPackages © 2026

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