mothership / mothership_magerun
Mothership Magerun Extensions for Magento
Installs: 356
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 7
Forks: 2
Open Issues: 6
Type:magento-module
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-10-24 13:35:28 UTC
README
#Mothership Magerun Addons
========================= This repository contains a list of extensions, which might be useful for your development workflow.
Installation
There are currently three different ways to include the magerun-components. I will describe every method. Please check the offical documentation for further questions. The preferred method imho should be the composer way.
Method 1 - the easiest one
This method needs you to have a home folder where all the custom modules will be located.
- Execute the following snippet
mkdir -p ~/.n98-magerun/modules/
- Clone the repository or symlink it. I prefer the symlink way as all my repositories are checked out in one place but this is up to you. The following example will clone the directory directly.
cd ~/.n98-magerun/modules/
git clone https://github.com/mothership-gmbh/magerun_mothership.git
Method 2 - still easy, but more environment specific
While there is one way to centralize all your modules i prefer to have environment specific modules.
- To achieve this, you just need to create a folder within your Magento project folder.
// replace MAGENTO_ROOT with your directory
mkdir -p MAGENTO_ROOT/lib/n98-magerun/modules
The next step is the same like before. Just clone and/or symlink the repository.
cd MAGENTO_ROOT/lib/n98-magerun/modules
git clone https://github.com/mothership-gmbh/magerun_mothership.git
Method 3 - composer.json
just add this require to your composer.json. Please check the latest tagged version by yourself.
"require":
{
"mothership/mothership_magerun":"<latest_tagged_version>"
}
Commands
mothership:environment:dump
Dump all settings from the table core_config_data
matching a given regular expression. Depends on a configuration file.
mothership:env:dump --
mothership:environment:import
Import the configuration settings by overwriting the existing configurations. There is one example file settings.example.php
.
Just copy the file as settings.php
and customize the settings for your needs.
- File Structure
You need to have some files in the directory Mothership\Environment\resource
. They should be named like environment_anyname
.
If there is more then one file, name it like your environments. Please define one file as a fallback.
mothership:images:create-dummy
This command will create an image file for each entry in the table catalog_product_entity_media_gallery
. Just ensure, that you have one file called dummy.jpg
in your media
directory. This can be useful if you have to deal with large product data but do not want to download a gigazillion large directory.
For more fun, use the official Mothership Image.
mothership:images:resize
Handy command, to minify the base-images. This will create a new directory named after the --dir
parameter and create a smaller version of all existing images. Please be aware that in case you have a new image file with the same name, this command will not recognize that. In this case remove the existing file from the resized image directory and rerun the command
magerun typehype:images:resize --dir=thumbnails --size=100
mothership:reports:observerstimes
This is a magerun command to create a csv reports to find all the events and relative observers called for each Magento page called in the browser during navigation.
magerun mothership:reports:observerstimes
mothership:workflow:render
Super fancy graph generator! Instead of running our state machines, you can also render them for easier debugging.
The graph creation depends on graphviz, so ensure that you have installed it first,
so that you can run the dot
command. Use apt-get install graphviz
in debian environments.
magerun mothership:workflow:render --config=Demo.yaml
The created graph will look like this one. Check the source file
And yes, you can run this workflow exactly like displayed in the graph. Check the next command.
mothership:workflow:run
Run a workflow from the directory <root>/app/etc/mothership/workflows
. This feature is very powerful and is being used in a lot of scenarios with a lot of
complexity. It basically depends on Mothership State Machine and is a helper to run a finite state machine in a Magento environment.
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
In additition to the plain PHP state machine implementation, this command has the following features:
- Parses a new node in the workflow definition file.
- Interactive mode: Each option can be set with a dialog.
- Queue: Use the queue php-resque to run workflows in the background.