mothership / mothership_magerun
Mothership Magerun 扩展程序,用于 Magento
Requires
- php: >=5.4
- firegento/psr0autoloader: dev-master
- magento-hackathon/magento-composer-installer: *
- mothership/state_machine: v1.4.5
- symfony/console: ~2.7
- symfony/yaml: ~2.7
Requires (Dev)
- aoepeople/composer-installers: *
- composer/composer: 1.0.*@dev
- escapestudios/symfony2-coding-standard: ~2.0
- n98/magerun: dev-master
- phpunit/phpunit: ~4.8
- dev-master
- v1.3.11
- v1.3.10
- v1.3.9
- v1.3.8
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0.0
- dev-develop
- dev-lock_system
- dev-#9_fix_observerstimes_for_magento1.9.2.3
- dev-#7_set_travis
- dev-#6_tracking_methods_arguments
This package is auto-updated.
Last update: 2024-09-24 13:19:17 UTC
README
#Mothership Magerun 扩展程序
========================= 本仓库包含了一系列扩展程序列表,这些扩展程序可能对你的开发工作流程非常有用。
安装
目前有三种不同的方式来包含 magerun-components。我将描述每种方法。请查阅官方 文档 了解更多信息。在我看来,首选的方法应该是 composer 方式。
方法 1 - 最简单的方法
此方法需要你有一个主目录,所有自定义模块都位于该目录。
- 执行以下代码片段
mkdir -p ~/.n98-magerun/modules/
- 克隆仓库或创建符号链接。我更喜欢使用符号链接方式,因为所有我的仓库都在一个地方检出,但这完全取决于你。以下示例将直接克隆目录。
cd ~/.n98-magerun/modules/
git clone https://github.com/mothership-gmbh/magerun_mothership.git
方法 2 - 仍然很简单,但更适用于特定环境
虽然有一种方法可以将所有模块集中在一起,但我更喜欢具有特定环境模块。
- 要实现这一点,你只需要在您的 Magento 项目文件夹中创建一个文件夹。
// replace MAGENTO_ROOT with your directory
mkdir -p MAGENTO_ROOT/lib/n98-magerun/modules
下一步与之前相同。只需克隆和/或创建符号链接到仓库。
cd MAGENTO_ROOT/lib/n98-magerun/modules
git clone https://github.com/mothership-gmbh/magerun_mothership.git
方法 3 - composer.json
只需将此 require 添加到您的 composer.json。请自行检查最新标签版本。
"require":
{
"mothership/mothership_magerun":"<latest_tagged_version>"
}
命令
mothership:environment:dump
从匹配给定正则表达式的 core_config_data
表中导出所有设置。依赖于配置文件。
mothership:env:dump --
mothership:environment:import
通过覆盖现有配置来导入配置设置。有一个示例文件 settings.example.php
。只需将文件复制为 settings.php
并根据您的需求自定义设置。
- 文件结构
您需要在 Mothership\Environment\resource
目录中拥有一些文件。它们的名称应类似于 environment_anyname
。如果有多个文件,请根据您的环境命名。请定义一个文件作为回退。
mothership:images:create-dummy
此命令将为 catalog_product_entity_media_gallery
表中的每个条目创建一个图像文件。请确保您的 media
目录中有一个名为 dummy.jpg
的文件。这在你必须处理大量产品数据但不想下载一个巨大的目录时非常有用。
为了更多乐趣,使用官方 Mothership 图像。
mothership:images:resize
这是一个方便的命令,用于最小化基础图像。这将创建一个以 --dir
参数命名的目录,并创建所有现有图像的较小版本。请注意,如果您有与相同名称的新图像文件,此命令将不会识别它。在这种情况下,请从调整大小的图像目录中删除现有文件,然后重新运行命令。
magerun typehype:images:resize --dir=thumbnails --size=100
mothership:reports:observerstimes
这是一个 magerun 命令,用于创建一个 csv 报告,以找到在浏览器导航过程中调用的每个 Magento 页面的事件和相关的观察者。
magerun mothership:reports:observerstimes
mothership:workflow:render
超级酷的图表生成器!除了运行我们的状态机外,您还可以渲染它们以方便调试。
图表创建依赖于graphviz,因此请确保您已安装它,以便运行dot
命令。在Debian环境中,请使用apt-get install graphviz
。
magerun mothership:workflow:render --config=Demo.yaml
创建的图表将类似于这样。请检查源文件
是的,您可以直接像图表中显示的那样运行此工作流程。请检查下一条命令。
mothership:workflow:run
从目录<root>/app/etc/mothership/workflows
运行工作流程。此功能非常强大,在许多复杂场景中使用。它基本上依赖于Mothership状态机,并是在Magento环境中运行有限状态机的辅助工具。
magerun mothership:workflow:run --config=yourworkflow.yaml
magerun mothership:workflow:run --config=yourworkflow.yaml --help
magerun mothership:workflow:run --config=yourworkflow.yaml --interactive
magerun mothership:workflow:run --config=yourworkflow.yaml --queue
除了纯PHP状态机实现之外,此命令还具有以下功能
- 解析工作流程定义文件中的新节点。
- 交互模式:每个选项都可以通过对话框设置。
- 队列:使用php-resque队列在后台运行工作流程。