mediameets / psh-commands
This package provides some useful PSH commands for developing and releasing plugins for Shopware 6.
Installs: 243
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Shell
Requires
- ext-json: *
- ext-simplexml: *
This package is auto-updated.
Last update: 2024-11-20 18:21:11 UTC
README
This package provides a library of useful generic PSH Commands when developing plugins for Shopware 5 and plugins or apps for Shopware 6.
Installation
Use composer to require this package as a development dependency in your Shopware plugin/app:
composer require mediameets/psh-commands --dev
Note from the original PSH package: Although you can use PSH as a composer dependency, we recommend to use the PHAR archive instead. As a result this command library does not install PSH as a composer dependency (any longer)!
Use library with existing psh config
Add all environments and placeholders from the .psh.xml.dist
file to your psh config file.
Use library without existing psh config
Copy the .psh.xml.dist
file into your plugin/app root folder:
cp vendor/mediameets/psh-commands/.psh.xml.dist .psh.xml.dist
Usually no further configuration is necessary. See configuration for more details.
Configuration for a Shopware 6 plugin or app
Configuration for a Shopware 5 plugin
Usage
Now you can use the commands via global installed psh:
psh
Overriding
It is possible to override all of the commands in this library. One situation where you want to override the command is for example sw6:release:zip
. This command creates a ZIP archive of your plugin/app folder and excludes unwanted files like composer.lock. So if you want to modify the excluded file list you need to override this command.
Do the following steps:
-
To override the command create a folder for example
psh/sw6/release/actions
in your plugins/apps root folder. -
Then copy the
sw6:release:zip
action (shell script) and make the desired changes:cp vendor/mediameets/psh-commands/sw6/release/actions/zip.sh psh/sw6/release/actions/zip.sh
-
Last but not least add the new path to your created folder to the
.psh.xml.dist
configuration file in the overriden environment:<environment name="sw6:release"> <path>vendor/mediameets/psh-commands/sw6/release/actions</path> <path>psh/sw6/release/actions</path> </environment>
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.