stackframework/container-interop
Composer 安装命令:
composer require stackframework/container-interop
包简介
Promoting the interoperability of container objects (DIC, SL, etc.)
README 文档
README
container-interop tries to identify and standardize features in container objects (service locators, dependency injection containers, etc.) to achieve interoperability.
Through discussions and trials, we try to create a standard, made of common interfaces but also recommendations.
If PHP projects that provide container implementations begin to adopt these common standards, then PHP applications and projects that use containers can depend on the common interfaces instead of specific implementations. This facilitates a high-level of interoperability and flexibility that allows users to consume any container implementation that can be adapted to these interfaces.
The work done in this project is not officially endorsed by the PHP-FIG, but it is being worked on by members of PHP-FIG and other good developers. We adhere to the spirit and ideals of PHP-FIG, and hope this project will pave the way for one or more future PSRs.
Installation
You can install this package through Composer:
composer require container-interop/container-interop
The packages adheres to the SemVer specification, and there will be full backward compatibility between minor versions.
Standards
Available
ContainerInterface. Description Meta Document. Describes the interface of a container that exposes methods to read its entries.- Delegate lookup feature. Meta Document. Describes the ability for a container to delegate the lookup of its dependencies to a third-party container. This feature lets several containers work together in a single application.
Proposed
View open request for comments
Compatible projects
Projects implementing ContainerInterface
- Acclimate: Adapters for
Aura.Di, Laravel, Nette DI, Pimple, Symfony DI, ZF2 Service manager, ZF2
Dependency injection and any container using
ArrayAccess - Aura.Di
- auryn-container-interop
- Burlap
- Chernozem
- Data Manager
- Disco
- InDI
- League/Container
- Mouf
- Njasm Container
- PHP-DI
- Picotainer
- PimpleInterop
- Pimple3-ContainerInterop (using Pimple v3)
- SitePoint Container
- Thruster Container (PHP7 only)
- Ultra-Lite Container
- Unbox
- XStatic
- Zend\ServiceManager
- Zit
Projects implementing the delegate lookup feature
- Aura.Di
- Burlap
- Chernozem
- InDI
- League/Container
- Mouf
- Picotainer
- PHP-DI
- PimpleInterop
- Ultra-Lite Container
Middlewares implementing ContainerInterface
- Alias-Container: add aliases support to any container
- Prefixer-Container: dynamically prefix identifiers
- Lazy-Container: lazy services
Projects using ContainerInterface
The list below contains only a sample of all the projects consuming ContainerInterface. For a more complete list have a look here.
| Downloads | |
|---|---|
| Adroit | |
| blast-facades: Minimize complexity and represent dependencies as facades. | |
| interop.silex.di: an extension to Silex that adds support for any container-interop compatible container | |
| mindplay/walkway: a modular request router | |
| mindplay/middleman: minimalist PSR-7 middleware dispatcher | |
| PHP-DI/Invoker: extensible and configurable invoker/dispatcher | |
| Prophiler | |
| Silly: CLI micro-framework | |
| Slim v3 | |
| Splash | |
| Woohoo Labs. Harmony: a flexible micro-framework | |
| zend-expressive |
Workflow
Everyone is welcome to join and contribute.
The general workflow looks like this:
- Someone opens a discussion (GitHub issue) to suggest an interface
- Feedback is gathered
- The interface is added to a development branch
- We release alpha versions so that the interface can be experimented with
- Discussions and edits ensue until the interface is deemed stable by a general consensus
- A new minor version of the package is released
We try to not break BC by creating new interfaces instead of editing existing ones.
While we currently work on interfaces, we are open to anything that might help towards interoperability, may that be code, best practices, etc.
stackframework/container-interop 适用场景与选型建议
stackframework/container-interop 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 11 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stackframework/container-interop 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stackframework/container-interop 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-11