magebit / module-magento2-configurator
此软件包最新版本(dev-magebit)没有提供许可证信息。
使用文件保持magento持久配置
dev-magebit
2024-08-05 11:04 UTC
Requires
- firegento/fastsimpleimport: ^2.0
- symfony/yaml: ~4.0|~5.0|~6.0
Requires (Dev)
- magento/magento-coding-standard: 5
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^6.2
- satooshi/php-coveralls: ^1.0
- sebastian/phpcpd: ~3.0 || ~4.0
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-09-05 11:08:49 UTC
README
这是一个由CTI Digital最初创建的magento模块,用于使用文件创建和维护数据库变量。本模块旨在为magento开发者的工作流程带来以下好处:
- 从零开始安装magento,并带有基于数据库的重要配置。
- 使用自己的版本控制系统与其他同事共享和协作配置。
- 使用自己的版本控制系统保存配置的版本。
- 根据您正在开发的 环境 分割配置。
Magebit的调整
- 创建/维护模式功能
- 目前支持以下组件
- 分类
- CMS页面/块
- 配置
- 目前支持以下组件
- 为CMS内容提供更好的模板系统,允许使用phtml文件
- 为创建模式添加版本控制(使用信息:https://github.com/magebitcom/magento2-configurator/wiki/Versioning)
- 目前支持以下组件
- CMS页面/块
- 目前支持以下组件
如果您想了解更多关于配置器背景的信息,请观看Raj Chevli在曼彻斯特的Mage Titans上的闪电演讲YouTube。
这是一个正在进行中的项目,绝对不适用于生产环境(可能甚至不适用于开发环境)。
本地开发测试
如果您正在贡献此模块,请运行以下命令以提高与Travis CI兼容的代码的最佳机会。这些测试包括PHP Code Sniffer、PHP Mess Detector、PHP Copy and Paste Detector、PHP Unit
php vendor/bin/phpcs --standard=vendor/magento/magento-coding-standard/Magento2/ruleset.xml vendor/ctidigital/magento2-configurator/Model/ vendor/ctidigital/magento2-configurator/Console/ vendor/ctidigital/magento2-configurator/Test/ vendor/ctidigital/magento2-configurator/Api/ vendor/ctidigital/magento2-configurator/Component/ vendor/ctidigital/magento2-configurator/Exception/
php vendor/bin/phpmd vendor/ctidigital/magento2-configurator/Model/,vendor/ctidigital/magento2-configurator/Console/,vendor/ctidigital/magento2-configurator/Test/,vendor/ctidigital/magento2-configurator/Api/,vendor/ctidigital/magento2-configurator/Component/,vendor/ctidigital/magento2-configurator/Exception/ text cleancode,codesize,controversial,design,naming,unusedcode
php vendor/bin/phpcpd vendor/ctidigital/magento2-configurator/Model/ vendor/ctidigital/magento2-configurator/Console vendor/ctidigital/magento2-configurator/Test/ vendor/ctidigital/magento2-configurator/Api/ vendor/ctidigital/magento2-configurator/Component/ vendor/ctidigital/magento2-configurator/Exception/
php vendor/bin/phpunit vendor/ctidigital/magento2-configurator/Test/Unit/
已知问题
集成测试
- 配置您的magento集成测试环境。
- 将以下XML添加到dev/tests/integration/phpunit.xml.dist
<testsuite name="magento2-configurator">
<directory>../../../vendor/ctidigital/magento2-configurator/Test/Integration</directory>
</testsuite>
- 您可以从正确的位置在命令行运行测试
/dev/tests/integration$ ../../../vendor/bin/phpunit --testsuite "magento2-configurator"
- 您还可以将magento PHP开发工具添加到您的路径中,这样您就不需要指定phpunit的位置
export PATH=$PATH:/var/www/magento2/vendor/bin
单元测试
如果您正在开发新的组件,请确保您有相应的单元测试,该单元测试扩展了ComponentAbstractTestCase
,因为这将测试您的组件是否具有所需的功能。请还包含与您的组件一起工作的示例文件
Travis
我们还使用Travis CI来自动化测试过程的一部分(我们仍在寻找添加更多内容的方法!)它测试以下内容
- CodeSniffer
- MessDetector
- 复制和粘贴检测
- 单元测试
- 运行配置器(我们旨在在这些版本上运行它)
- 最新的3个次要版本
- 最新的发布候选版(允许失败)
入门指南
- 在
<mage_root>/app/etc/
中创建一个master.yaml
文件。(见Samples/master.yaml
) - 启用模块
CtiDigital_Configurator
、FireGento_FastSimpleImport
。 - 运行
bin/magento configurator:run --env="<environment>"
使用方法
- 列出可用组件
bin/magento configurator:list
- 运行单个组件
bin/magento configurator:run --env="<environment>" --component="config"
- 额外日志
bin/magento configurator:run --env="<environment>" -v
组件要做的事的路线图
许可证
MIT