Awesome
plugin-dev-tools
Description
This tools provide fast ways to solve common plugin development issues.
Adding plugin-dev-tools to your plugin
- Add this repository to your composer file and run
$ composer install
- Create a symlink
$ ln -s vendor/shopware/plugin-dev-tools/psh.phar psh
- Go to
vendor/shopware/plugin-dev-tools
and run$ ./install.sh
- Go to your plugin-root and run
$ ./psh
Warning
Add the psh
symlink to your .sw-zip-blacklist
to prevent releasing a dead symlink which would break shopware updates.
Commands
docker:cleanup - Cleansup the shopware installation
docker:destroy - Destorys all docker containers
docker:init - Similar to local:init, builds shopware
docker:ssh - Connect to your app docker container via ssh
docker:start - Start docker containers
docker:stop - Stops all docker containers
docker:unit - Runs unit tests
local:init - Prepares your shopware installation
local:cleanup - Cleans up your shopware installation
local:reinstall - Reinstalls the current plugin
local:unit - Runs unit tests
local:unit-coverage - Generates coverage to ~/plugin-coverage/{plugin-name}
Add custom plugin setups
Add a script to add a custom installation routine which will be executed by the plugin-dev-tools.
- add a
before_install_plugin.sh
in your plugin root directory chmod +x before_plugin_install.sh
Coverall support on travis
- Create a
build/logs/
directory in your plugin - Execute your tests
./psh travis:unit-coveralls
- Add to the travis
after_success
this line./psh travis:send-coverall-report
to send the coverage report
Example
You can find an example here: https://github.com/shopwareLabs/SwagBackendOrder