定制 netresearch/module-compatibility-m2 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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)

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 10
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固