ocramius/ocra-service-manager
最新稳定版本:2.1.2
Composer 安装命令:
composer require ocramius/ocra-service-manager
包简介
ZF2 Service manager extensions to allow service proxies and dependency graph generation
README 文档
README
OcraServiceManager is a Zend Framework 2 Module that decorates Zend\ServiceManager\ServiceManager
to allow tracking dependencies between services.
It integrates with ZendDeveloperTools to provide aid in debugging what is happening between your dependencies, allowing you to produce dependency graphs such as the following one:
It is heavily tested and supports proxying of any possible object type.
If you don't know what proxies are, you can read my article about service proxies and why we need them.
Status
| Tests | Releases | Downloads | Dependencies |
| ----- | -------- | ------- | ------------- | --------- | ------------ |
|
|
|
|
|
Installation
The recommended way to install
ocramius/ocra-service-manager is through
composer:
php composer.phar require ocramius/ocra-service-manager
You can then enable this module in your config/application.config.php by adding
OcraServiceManager to the modules key:
// ... 'modules' => array( // add OcraServiceManager and ZDT... 'ZendDeveloperTools', 'OcraServiceManager', // ... and then your stuff 'MyOwnModule', ),
Please note that you need to enable service manager logging and the ZendDeveloperTools toolbar to actually see something working.
Configuration
Following config keys are provided by default, but you can change them as you want. You can
drop a file ocra-service-manager.local.php into your config/autoload directory to
enable or disable logging of your service manager instances:
return array( 'ocra_service_manager' => array( // Turn this on to disable dependencies view in Zend Developer Tools 'logged_service_manager' => true, ), );
Please note that logging is enabled by default
Testing and Contributing
Please refer to the contents of .travis.yml to see how to test your patches
against OcraServiceManager.
Any pull requests will be accepted only if:
- code coverage on newly introduced code is >= 90% (use
@coversNothingon integration tests, please) - coding standard complies with PSR-2
- generally tries to respect object calisthenics
Known limitations:
- Installing the module itself won't allow tracking the first service-manager events in
your application. If you need to have that working, you will need to override the
implementation of
Zend\Mvc\Application::init() - If you have an authorization module enabled, be aware that
OcraServiceManagerregisters a new controller'OcraServiceManager\Controller\YumlController'as well as a new route'ocra_service_manager_yuml'. You will need to enable access to both these in development mode in order to see the dependencies diagram.
ocramius/ocra-service-manager 适用场景与选型建议
ocramius/ocra-service-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40.03k 次下载、GitHub Stars 达 46, 最近一次更新时间为 2012 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ocramius/ocra-service-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ocramius/ocra-service-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 40.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 48
- 点击次数: 27
- 依赖项目数: 3
- 推荐数: 4
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-02