netresearch/module-compatibility-m2
最新稳定版本:3.0.0
Composer 安装命令:
composer require netresearch/module-compatibility-m2
包简介
Magento2 Extension for enabling extensions to support multiple Magento2 versions at once
README 文档
README
The target of this 'extension' is to provide forward/backward compatibility ports of functionality within Magento2. This is aimed at extension developers to allow them to only have to maintain one development branch of their extension, that can be compatible with all Magento versions.
Example
Magento 2.3 introduced the CsrfAwareActionInterface which allows controllers to receive POST requests from outside of the shop (e.g. for postsale activities of payment service providers). To retain functionality the extension provider would have to maintain two development branches of their extension, one for Magento 2.3 with the interface, and one without.
To avoid this, this extension provides an abstract controller that can be extended by controllers within third party extensions that need this functionality (implementing the CsrfAwareInterface). They will have to implement some abstract methods, however they can use one development branch for their extension.
How to use
This extension has multiple versions:
- 1.* - supporting Magento 2.1.*
- 2.* - supporting Magento 2.2.*
- 3.* - supporting Magento 2.3.*
- ...
To use the features of this extension add an requirement in your extensions composer.json:
{
"require": {
"netresearch/module-compatibility-m2": "*"
}
}
Yes we recommend *, if you don't care or e.g. >=2.0.0 if you want to support Magento 2.2.*.
This extension will itself require the affected Magento components (e.g. magento/framework) in the related versions,
which will only allow a specific version of this extension on the merchants installation through composer.
Supported Forward/Backward compatibilities
CsrfAwareActionInterface (Magento\Framework\App\CsrfAwareActionInterface)
Compatibility breaking version: Magento 2.3.0
To have a backward compatible controller for Magento 2.3 that can accept external POST requests, just extend {{Netresearch\Compatibility\Controller\CsrfAware\Action}} and implement the abstract methods. For Magento 2.2 and 2.1 that will likely result in dead code (unless you refer to those functions in the rest of you Controller), but you don't have to worry about managing the Interface implementation yourself.
License
Open Software License v. 3.0 (OSL-3.0)
Copyright
Netresearch DTT GmbH (www.netresearch.de)
netresearch/module-compatibility-m2 适用场景与选型建议
netresearch/module-compatibility-m2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 173.96k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 netresearch/module-compatibility-m2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 netresearch/module-compatibility-m2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 173.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-03-21