承接 teknoo/bridge-phpdi-symfony 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

teknoo/bridge-phpdi-symfony

最新稳定版本:7.1.2

Composer 安装命令:

composer require teknoo/bridge-phpdi-symfony

包简介

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

README 文档

README

Latest Stable Version Latest Unstable Version Total Downloads License PHPStan

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.

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

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 or Github.

Thanks :) Richard.

Credits

EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://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

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

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 :)

You are welcome to contribute to this project. Fork it on Github

统计信息

  • 总下载量: 27.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 10
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-07-17