fxcosta/zf2-for-1
Composer 安装命令:
composer require fxcosta/zf2-for-1
包简介
Compatibility layer for ZF1 application allowing usage of ZF2 features
关键字:
README 文档
README
Version 0.0.1 Created by Evan Coury and Xerkus.
Introduction
Original intention of ZF2-for-1 was to provide a compatibility layer for Zend Framework 1, allowing to use Zend Framework 2 features in ZF1 application. ZF2-for-1 provides some basic functionality for such integration indeed, but we believe that migrating to ZF2 is a way to go.
In fact it proved to be quite easy to move (M)VC layer of ZF1 application to
ZF2. And much easier than to run both applications in parallel.
It is explained by the fact that ZF2 is very flexible while ZF1... well,
not.
This opens possibility for fast straightforward migration, while keeping
most of the application code intact, and for gradual refactoring towards modern
zf2 application afterwards.
To outline said above: current goal of Zf2-for-1 is to reimplement some of the ZF1 features in ZF2 to make initial migration fast and easy.
Current Features
Basic features for zf1 application
- Registers the ZF2 autoloader
- Bootstraps ZF2 configuration and modules
- Makes ZF2 ServiceManager available to zf1 application
- Makes ZF1 application config and bootstrap object available to ServiceManager
- Registers ServiceManager in
Zend_Registryunder'service_manager'key
Features for initial migration to ZF2
- Helper class to mimic zf1 request parameters fallback: route -> get -> post
Installation
Composer install:
- Add to you composer.json
"require": {
"roave/zf2-for-1": "dev-master"
}
- Run composer install
- Add this to
application/configs/application.ini:
pluginpaths.Zf2for1_Resource = APPLICATION_PATH "/../vendor/roave/zf2-for-1/src/Zf2for1/Resource" ; This is path where Zf2for1 will be looking by default for zf2 application config ;resources.zf2.config_path = APPLICATION_PATH "/../config/" ;register service manager to Zend_Registry under the key 'service_manager' resources.zf2.add_sm_to_registry = true resources.view[] =
Example can be found here
Alternative install:
- Clone this repository into
APPLICATION_PATH/../vendor/Zf2for1directory. - Download ZF2 and put the
library/Zenddirectory inAPPLICATION_PATH/../vendor/ZF2/(Resulting path should be vendor/ZF2/Zend) - Add this to
application/configs/application.ini:
pluginpaths.Zf2for1_Resource = APPLICATION_PATH "/../vendor/Zf2for1/src/Zf2for1/Resource" resources.zf2.zf2_path = APPLICATION_PATH "/../vendor/ZF2" ; This is path where Zf2for1 will be looking by default for zf2 application config ;resources.zf2.config_path = APPLICATION_PATH "/../config/"
Plans
There are a lot of ways this could be improved.
- More features
- Usage examples
- Update README
License
ZF 2-for-1 is released under the New BSD license. See the included LICENSE file.
fxcosta/zf2-for-1 适用场景与选型建议
fxcosta/zf2-for-1 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 03 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「zf2」 「ZF1」 「compatibility」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fxcosta/zf2-for-1 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fxcosta/zf2-for-1 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fxcosta/zf2-for-1 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LosLog provides some log utility
Polyfill for the New Relic PHP extension
EdpModuleLayouts is very simple Laminas module for making module-specific layouts insanely easy.
Compatibility layer for emulating enumerations in PHP < 8.1 and native enumerations in PHP >= 8.1
Zend Framework module to leverage the symfony dependency injection container
RCM User HTML views/pages
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-03-20