Lokale Einrichtung
Diese Seite zeigt, wie du eine lokale Entwicklungsumgebung mit Shopware 6.7 und Guppy aufbaust. Voraussetzung: ein lauffähiges Shopware-Setup. Wenn du noch kein Shopware lokal hast, beginne mit der offiziellen Shopware-Installationsanleitung.
Tooling-Stacks
Drei verbreitete Optionen, wähle nach Team-Standard:
| Stack | Vorteil | Best for |
|---|---|---|
| Symfony Local Server | leichtgewichtig, native Performance auf macOS/Linux | schnelles Prototyping |
| ddev | reproduzierbar, vorkonfiguriert für Shopware | Team-Setups, mehrere Projekte parallel |
| Dockware | nahezu identisch zur Plugin-Entwicklungsumgebung der Plugin-READMEs | Plugin-Entwicklung mit make watch-storefront |
Empfohlener Setup-Pfad (ddev)
# 1. Shopware-Projekt klonen oder neu anlegen
git clone <project-url> shopware-project
cd shopware-project
# 2. ddev konfigurieren und starten
ddev config --project-type=shopware6
ddev start
# 3. Composer installieren
ddev composer install
# 4. Shopware initialisieren
ddev exec bin/console system:install --basic-setupGuppy installieren
Im Projekt-Root:
ddev composer require dmf/sw6-guppy-theme
ddev exec bin/console plugin:refresh
ddev exec bin/console plugin:install --activate DmfSplideSlider
ddev exec bin/console plugin:install --activate DmfGuppyTheme
ddev exec bin/console theme:change
ddev exec bin/console theme:compile
ddev exec bin/console cache:clearVollständige Installations-Details: Installation.
Storefront-Watcher
Für Live-Reload während der SCSS- und JS-Entwicklung:
ddev exec bin/watch-storefront.shDie Watcher-URL erscheint im Terminal, typischerweise http://localhost:9998.
Watcher beendet
Mit Ctrl+C lässt sich der Watcher beenden; das ursprüngliche Storefront-Asset-Setup wird nicht automatisch wiederhergestellt, bei Bedarf bin/build-storefront.sh und theme:compile ausführen.
Administration-Watcher
ddev exec bin/watch-administration.shDev-Admin unter http://localhost:8888.
Build-Befehle
ddev exec bin/build-storefront.sh # Storefront-Bundle
ddev exec bin/build-administration.sh # Admin-Bundle
ddev exec bin/build-js.sh # JS-only Build (für Plugins)
ddev exec bin/console theme:compile # SCSS + theme.json → CSS
ddev exec bin/console cache:clear # Cache leerenGuppy-spezifische Console-Commands
DmfGuppyTheme registriert eigene Befehle, die das Setup beschleunigen:
| Befehl | Zweck |
|---|---|
bin/console guppy:theme:create | Erstellt ein Child-Theme-Skelett interaktiv. |
bin/console guppy:install:plugins | Installiert empfohlene Guppy-Plugins via Composer. |
bin/console guppy:upgrade:scan | Prüft installierte Guppy-Komponenten gegen eine Ziel-Shopware-Version. |
Details und Optionen: siehe Architektur und Mitwirken.
Plugin lokal entwickeln
Plugins liegen unter custom/plugins/<PluginName>/. Eigene Plugins via Composer-Path-Repository einbinden, damit du sie versionsgleich entwickeln kannst:
{
"repositories": [
{ "type": "path", "url": "custom/plugins/MyPlugin" }
]
}Anschließend:
ddev composer require myvendor/my-plugin
ddev exec bin/console plugin:refresh
ddev exec bin/console plugin:install --activate MyPluginIDE und Linter
Guppy-Plugins bringen meist mit:
easy-coding-standard.php(vendor/bin/ecs check src tests)phpstan.neon(vendor/bin/phpstan analyze)Makefilemit Targetslint,test,phpunit
Beispiel:
cd custom/plugins/DmfGuppyTheme
make lint
make phpunitDebugging
# Plugin-Status
ddev exec bin/console plugin:list | grep -i guppy
# Storefront-Logs
ddev exec tail -f var/log/dev-*.log
# Composer-Verbose
ddev composer install -vNächste Schritte
- Architektur: Folder-Layout, theme.json-Modell, Vererbungs-Reihenfolge.
- Variablen & Tokens: SCSS-Architektur und Tokens.
- Twig-Overrides: eigene Templates schreiben.
- Mitwirken: Branch-Strategie und PR-Workflow.