PHP-DI Symfony Bridge
Use PHP-DI containers and packages using it in your Symfony application.
This package provides integration for PHP-DI with Symfony. PHP-DI 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.
If you use a previous version of PHP-DI Bridge, remove PHP-DI Kernel overload and use the default kernel.
Use the Bridge like any Symfony Bundle
No require customization of Symfony
Each container can communicate with each other
Allow use of universal package with Symfony
Fork the project on GitHub
It is open source! It's hosted, developed, and maintained on GitHub by folks like you.
View GitHub Project
Support this project on Patreon
This project is free and will remain free, but it is developed on my free time. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon. Thanks :) Richard.
// 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
- 'list of PHP-DI definitions file, you can use Symfony joker like %kernel.project_dir%'
#To make alias from SF entries into PHPDI