Appearance
Development environment
For developers
Every plugin repository ships its own Docker stack, so you can work on one plugin without setting up Shopware yourself.
Start a plugin's stack
bash
git clone https://github.com/KommandHub/<Repository>.git
cd <Repository>
make up # build the image, start Shopware, install dependencies
make shell # bash into the container
# inside the container
bin/console plugin:refresh
bin/console plugin:install --activate <PluginName>The stack is based on the dockware/shopware image (Shopware 6.7.8, PHP 8.3) with shopware-cli added. The repository is mounted at /var/www/html/custom/static-plugins/<PluginName>; .git/, node_modules/ and vendor/ are excluded from the mount.
Default dockware logins:
| User | Password | |
|---|---|---|
| Administration | admin | shopware |
| Database | root | root (database shopware) |
make down and make restart delete the database
In the plugin stacks, make down runs docker compose down -v, which removes the database volume and the installed shop. make restart does the same. Stop the containers with docker compose stop if you want to keep your data.
No host port by default
None of the plugin stacks publishes a host port in its docker-compose.yml (some READMEs still say the shop is at http://localhost). To open the storefront or Administration in a browser, add ports: ["80:80"] to the shopware service and run docker compose up -d.
Make targets
| Target | What it does |
|---|---|
make up / make down | Start / tear down the stack (down wipes the database) |
make shell | Shell into the container |
make test | PHPUnit. Filter: make test FILTER=SomeTest |
make test-coverage | Coverage report |
make analyse | PHPStan on src/ |
make cs / make cs-fix | php-cs-fixer dry run / apply |
make validate-plugin | shopware-cli extension validate --full --store-compliance inside the container |
make changelog | Render CHANGELOG.md the way the Shopware Store displays it |
make zip | Build a distributable ZIP into build/ |
make cli ARGS="…" | Run any other shopware-cli command |
Run make validate-plugin inside the container, not with a host-installed shopware-cli: only the container has the full Shopware vendor tree, and the host binary reports false PHPStan errors.
Rebuilding assets
bash
make shell
./bin/build-administration.sh # Administration bundles
./bin/build-storefront.sh # Storefront bundlesIf the full Administration build runs out of memory, build only extensions:
bash
SHOPWARE_ADMIN_BUILD_ONLY_EXTENSIONS=1 ./bin/build-administration.sh
bin/console assets:install && bin/console cache:clearHard-reload the Administration afterwards; the bundle filename changes with every build.
Adding a Composer dependency to a plugin
Update only the package you need:
bash
composer update <vendor>/<package> --no-scriptsAvoid composer update --with-all-dependencies. It also upgrades libraries shared with Shopware; a Twig upgrade pulled in this way has broken the Administration (500 on every page) in our stack before.
Testing webhooks locally
Payment and SMS webhooks need a public URL. Use a tunnel (for example cloudflared or ngrok) and add the tunnel's hostname as a domain on a sales channel — otherwise Shopware answers 400 before the plugin's controller runs. Use test/sandbox keys only.