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), which is often used for production environments.
Initialized via (but modified afterwards):
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
This is a learning project (which is not yet published)! If you want to use it, use it at your own risk!
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.
Some commands I am using while development after docker compose up
:
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
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
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