yireo / magento2-extension-validation-tools
N/A
0.0.2
2022-07-10 08:05 UTC
Requires
- magento/framework: *
- yireo/magento2-extensionchecker: *
This package is auto-updated.
Last update: 2024-09-22 00:57:21 UTC
README
本扩展验证其他扩展的代码,并作为静态代码分析工具如PHPCS的补充。
示例 1:比较composer版本
bin/magento extension:validate:version_match /path/to/your/extension/composer.json
此命令允许您扫描某个扩展的给定composer.json
文件,而无需安装该扩展。这允许您在尝试安装扩展之前修改该扩展的依赖关系(这可能会节省宝贵的时间)。
输出应为空才能成功。当找到不匹配的版本时,可能会如下所示
ERROR: "magento/framework:103.0.0" does not match required version "^100.1|^101.0|^102.0"
示例 3:创建单元测试(@todo:将其移到另一个模块)
bin/magento extension:validate:generate-unit-test --module Yireo_Webp2 --class '\Yireo\Webp2\Convertor\Convertor'