semaio/magento2-configimportexport 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

semaio/magento2-configimportexport

Composer 安装命令:

composer require semaio/magento2-configimportexport

包简介

Import/Export core_config_data values in Magento 2

README 文档

README

This extension provides CLI commands for Magento 2 to import/export system configuration data.

Why this extension?

While Magento 2 offers the app:config:dump / app:config:import commands, they're limited to one environment and a little bit hard to manage, especially in CI/CD setups.

This extension supports managing configuration values for multiple environments (production, staging, etc.) out-of-the-box, defining and overwriting base configuration values in a specific environment. It also allows different file formats (e.g., YAML, JSON). In general, it makes that process a bit more streamlined and easier to manage, with the added benefit of generalization and cross-compatibility with other agencies/merchants using this.

Installation

Add the package to your composer.json

composer require semaio/magento2-configimportexport

Enable and install the module

php bin/magento module:enable Semaio_ConfigImportExport
php bin/magento setup:upgrade

Facts

  • Supported Magento versions are 2.4.4+.
  • Supported PHP versions are 8.1, 8.2, 8.3, and 8.4.

Functionality

This module is a work in progress and will be extended in the future with more functionality and support for other file formats.

File formats

This module currently supports the following file formats:

  • YAML (default)
  • JSON

See docs/file-formats.md for more information and examples.

Import config data

See docs/config-import.md for more information.

Export config data

See docs/config-export.md for more information.

Usage with Deployer

When using a push approach in CI/CD, the environment variables should be replaced on the runner and not on the initiating host or target host. For this, you can use this Deployer task to do this and import the config settings;

task('magento:config:set', function () {
    $resolver = new \Semaio\ConfigImportExport\Model\Resolver\EnvironmentVariableResolver();
    $glob = glob('config/store/**/*.yaml');
    array_walk($glob, function ($file) use ($resolver) {
        if (file_put_contents($tempFile = tempnam('/tmp', get('clientslug')), $resolver->resolveValue(file_get_contents($file)))) {
            upload($tempFile, get('release_path') . '/' . $file);
        }
    });
    run('{{bin/php}} {{release_path}}/bin/magento config:data:import {{release_path}}/config/store ' . get('environment'));
});

Support

If you encounter any problems or bugs, please create an issue on GitHub.

Contribution

Any contribution to the development of MageSetup is highly welcome. The best possibility to provide any code is to open a pull request on GitHub.

Licence

Open Software License (OSL 3.0)

Contributors

Thanks to all contributors who invested their valuable time to contribute to this module. Much appreciated!

Inspiration

This module is inspired by the awesome n98-magerun plugin "HarrisStreet ImpEx" by @SchumacherFM for Magento 1 which you can find here.

Copyright

(c) 2016-2022 semaio GmbH / Rouven Alexander Rieker

semaio/magento2-configimportexport 适用场景与选型建议

semaio/magento2-configimportexport 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 778.15k 次下载、GitHub Stars 达 165, 最近一次更新时间为 2016 年 04 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 semaio/magento2-configimportexport 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 semaio/magento2-configimportexport 我们能提供哪些服务?
定制开发 / 二次开发

基于 semaio/magento2-configimportexport 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 778.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 165
  • 点击次数: 21
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 165
  • Watchers: 16
  • Forks: 62
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2016-04-01