Skip to content

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:

StackVorteilBest for
Symfony Local Serverleichtgewichtig, native Performance auf macOS/Linuxschnelles Prototyping
ddevreproduzierbar, vorkonfiguriert für ShopwareTeam-Setups, mehrere Projekte parallel
Dockwarenahezu identisch zur Plugin-Entwicklungsumgebung der Plugin-READMEsPlugin-Entwicklung mit make watch-storefront

Empfohlener Setup-Pfad (ddev)

bash
# 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-setup

Guppy installieren

Im Projekt-Root:

bash
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:clear

Vollständige Installations-Details: Installation.

Storefront-Watcher

Für Live-Reload während der SCSS- und JS-Entwicklung:

bash
ddev exec bin/watch-storefront.sh

Die 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

bash
ddev exec bin/watch-administration.sh

Dev-Admin unter http://localhost:8888.

Build-Befehle

bash
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 leeren

Guppy-spezifische Console-Commands

DmfGuppyTheme registriert eigene Befehle, die das Setup beschleunigen:

BefehlZweck
bin/console guppy:theme:createErstellt ein Child-Theme-Skelett interaktiv.
bin/console guppy:install:pluginsInstalliert empfohlene Guppy-Plugins via Composer.
bin/console guppy:upgrade:scanPrü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:

json
{
  "repositories": [
    { "type": "path", "url": "custom/plugins/MyPlugin" }
  ]
}

Anschließend:

bash
ddev composer require myvendor/my-plugin
ddev exec bin/console plugin:refresh
ddev exec bin/console plugin:install --activate MyPlugin

IDE und Linter

Guppy-Plugins bringen meist mit:

  • easy-coding-standard.php (vendor/bin/ecs check src tests)
  • phpstan.neon (vendor/bin/phpstan analyze)
  • Makefile mit Targets lint, test, phpunit

Beispiel:

bash
cd custom/plugins/DmfGuppyTheme
make lint
make phpunit

Debugging

bash
# 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 -v

Nächste Schritte