zero1/magento-dev
Composer 安装命令:
composer require zero1/magento-dev
包简介
关键字:
README 文档
README
This project takes inspiration from the Laravel artisan make commands.
This is very much a work in progress, any feedback or contributes are welcome.
Features
TODO
- refactor routes logic to OOP (like observer logic)
- refactor cli command logic to OOP (like observer logic)
Vendor Patches
The ability to generate patches from the vendor directory. For example if you have had to craft a fix for a module and the vendor hasn't supplied a patch yet.
Summary
./vendor/bin/magentodev vendor:diff
Detail / patch generation
./vendor/bin/magentodev vendor:diff --package=magento/framework
Module Creation
Summary
./vendor/bin/magentodev module:make
Make CLI Command
Description:
Add a CLI command to an existing extension.
Usage:
make:cli-command [options] [--] [<--force>]
Arguments:
--force If supplied and class/file exists, it will be overwritten [default: false]
Options:
--name=NAME Name of the module (Magento module name, MyCompany_MyModule)
--command-class-name[=COMMAND-CLASS-NAME] Name of the class for the command (MyCommand)
--command-signature[=COMMAND-SIGNATURE] The signature of the command. (defaults to example:command)
--command-help[=COMMAND-HELP] The help/description of the command (default "")
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example
./vendor/bin/magentodev make:cli-command
Make Controller
Description:
Create a controller
Usage:
make:controller [options]
Options:
--name=NAME Name of the module (Magento module name, MyCompany_MyModule)
--area=AREA Area (frontend, adminhtml, rest-api)
--frontname=FRONTNAME Front name of the controller (e.g https://www.example.com/FRONTNAME/controller/action)
--controller=CONTROLLER Controller (e.g https://www.example.com/frontname/CONTROLLER/action)
--action=ACTION Action (e.g https://www.example.com/frontname/controller/ACTION)
--response-type=RESPONSE-TYPE Response type (html, json, txt)
--http-method=HTTP-METHOD HTTP Method (GET, POST)
--force Overwrite files without asking.
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
This command allows you to create a controller within a module
Make Observer
Description:
Create an observer
Usage:
make:observer [options]
Options:
--name=NAME Name of the module (Magento module name, MyCompany_MyModule)
--area=AREA Area (global, adminhtml, crontab, frontend, graphql, webapi_rest, webapi_soap), provide comma separated list for multiple.
--event=EVENT Event name to listen to
--force Overwrite files without asking.
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
This command allows you to create an observer for a specific event within a module
Planned Features
- Templates for modules
- Nicer interface for managing submodules
- Create plugins / components / models automatically.
Know Issues
- at present comments are lost in xml files when the file is updated.
Deving on module
git submodule add --name Zero1_MagentoDeveloperUtils --branch dev git@github.com:zero1limited/magento2-developer-utils.git extensions/zero1/magento2-developer-utils
"zero1-dev-extensions": { "type": "path", "url": "extensions/zero1/magento2-developer-utils", "options": { "symlink": true } }
composer require --dev zero1/magento-dev:@dev
zero1/magento-dev 适用场景与选型建议
zero1/magento-dev 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 438 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「magento」 「magento 2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zero1/magento-dev 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zero1/magento-dev 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zero1/magento-dev 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Magento - Clean up session extension
Magento - Force store code extension
Magento 2 module to optimize Compiled ObjectManager
Automatic Currency Switcher Extension for Magento 2
Magento - Disable newsletter notifications extension
统计信息
- 总下载量: 438
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2023-09-19