Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fibrefox/shopware-cli-additions
Shopware Plugin for additional CLI commands
https://github.com/fibrefox/shopware-cli-additions
php8 shopware shopware-plugin shopware6 shopware6-plugin
Last synced: 25 days ago
JSON representation
Shopware Plugin for additional CLI commands
- Host: GitHub
- URL: https://github.com/fibrefox/shopware-cli-additions
- Owner: FibreFoX
- License: apache-2.0
- Created: 2024-03-11T21:32:49.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-23T09:26:50.000Z (10 months ago)
- Last Synced: 2024-11-06T01:55:53.029Z (2 months ago)
- Topics: php8, shopware, shopware-plugin, shopware6, shopware6-plugin
- Language: PHP
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Additional CLI commands for Shopware 6
![Plugin-Logo](./custom/plugins/DynamicFilesCLIAdditions/src/Resources/config/plugin.png)
## About this plugin
When installing and managing Shopware instances, especially when using Ansible for configuration management, a lot of crucial CLI commands are just plain MISSING. This project is intended for learning purposes and for having others participate from my learning.
Developing with Docker image (like [shyim/shopware](https://hub.docker.com/r/shyim/shopware/)), which is often used for production environments.
Initialized via (but modified afterwards):
```sh
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console plugin:create --create-config DynamicFilesCLIAdditions
```## Important note
This is a learning project (which is not yet published)! If you want to use it, use it at your own risk!
## Provided commands
```
Available commands for the "cli-additions" namespace:
cli-additions:rules:get-id Get ID of rule with given name.
cli-additions:rules:list List all available rules.
cli-additions:system:acl-roles:list List all available user roles.
cli-additions:system:acl-roles:list-role-permissions List all permissions for given user role.
cli-additions:system:skip-first-run-wizard Marks the FirstRunWizard (FRW) as already executed.
cli-additions:system:usage-data:accept Accept the terms and enable system usage data sharing.
cli-additions:system:usage-data:revoke Revoke/Decline the terms for system usage data sharing.
cli-additions:system:usage-data:skip-for-user Skip the usage data sharing request for given user.
```## Dev-Setup
Some commands I am using while development after `docker compose up`:### Install and activate plugins
```
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console plugin:install DFCLIAdditions
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console plugin:activate DFCLIAdditions
```### Skip that nasty First-Run-Wizard
```
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console system:config:set core.frw.completedAt "2024-03-01T12:00:00+00:00"
```
or
```
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console cli-additions:system:skip-first-run-wizard
```## Knowhow
https://symfony.com/doc/current/service_container/debug.html
```
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console debug:container
``````
docker compose run --rm -it --entrypoint /usr/bin/sudo shopware -E -u www-data php /var/www/html/bin/console cli-additions --help
```