Zum Inhalt springen

DDEV for Symfony and Shopware: The Perfect Local Development Environment

Veröffentlicht am Feb 17, 2026 | ca. 3 Min. Lesezeit |

After years with Vagrant, Docker Compose and manual setups, I've settled on DDEV — and I'm staying. Here's why.

What Makes DDEV Different

DDEV is a Docker-based development environment that does exactly one thing extremely well: getting local PHP projects up and running. Unlike a hand-written docker-compose.yml, DDEV offers:

  • Zero Config: ddev config automatically detects Symfony, Shopware, WordPress
  • HTTPS out of the Box: Local SSL certificates via mkcert
  • Multi-Project: Multiple projects running in parallel, each with its own URL
  • Versioning: PHP version, MariaDB version, Node.js — all configurable

Quick Start for a Symfony Project

cd mein-symfony-projekt
ddev config --project-type=symfony
ddev start

# HTTPS URL immediately available
open https://mein-symfony-projekt.ddev.site

The .ddev/config.yaml:

name: mein-projekt
type: symfony
php_version: "8.2"
mariadb_version: "10.11"
nodejs_version: "20"
webserver_type: nginx-fpm

All Commands Run in the Container

Important: PHP, Node.js and Composer always run inside the container. The host system only needs Docker and DDEV:

# PHP commands
ddev exec composer install
ddev exec bin/console cache:clear
ddev exec vendor/bin/phpunit

# Node commands
ddev exec npm install
ddev exec npm run build

# Database access
ddev mysql
ddev export-db --file=backup.sql.gz
ddev import-db --file=backup.sql.gz

Shopware 6 with DDEV

Shopware requires some extras — Elasticsearch, Redis, RabbitMQ. DDEV supports these via add-ons:

ddev get ddev/ddev-elasticsearch
ddev get ddev/ddev-redis

In the .ddev/config.yaml:

name: mein-shop
type: shopware6
php_version: "8.2"
mariadb_version: "10.11"

Playwright Tests in the Container

A special setup: running E2E tests with Playwright directly inside the DDEV container. The advantage: no local Chromium installation needed, tests run in the same environment as the application.

# Install Chromium (one-time)
ddev exec npx playwright install chromium
ddev exec npx playwright install-deps chromium

# Run tests
ddev exec npx playwright test

Important: The baseURL in the Playwright config must be https://localhost (not the .ddev.site URL), since Playwright runs inside the container:

export default defineConfig({
    use: {
        baseURL: process.env.BASE_URL || 'https://localhost',
        ignoreHTTPSErrors: true,
    },
});

Multi-Project Operation

DDEV manages router containers that make all projects accessible under their own URLs:

https://firma-neu.ddev.site     → Symfony website
https://dj-ti-max.ddev.site     → DJ website
https://mein-shop.ddev.site     → Shopware 6

Each project has its own database, its own PHP version and its own Node.js process. No conflicts, no setup hassle.

Tips from Practice

1. Pin the database version: If the database was originally created with MariaDB 10.3, the config must also specify 10.3 — otherwise you'll run into compatibility issues on import.

2. Xdebug on demand: Xdebug slows down PHP significantly. Only enable it when needed:

ddev xdebug on   # Enable step debugging
ddev xdebug off  # Disable again

3. Custom Commands: Create your own shortcuts for frequently used commands:

# .ddev/commands/host/deploy
#!/bin/bash
ddev exec bin/console cache:clear --env=prod
ddev exec composer install --no-dev --optimize-autoloader
echo "Deploy-Vorbereitung abgeschlossen!"

DDEV has fundamentally changed the way I develop locally. The setup time for a new project has shrunk from hours to minutes — and the reproducibility of the environment completely eliminates "works on my machine" problems.

Thomas Wunner

Thomas Wunner

Certified IT specialist for application development with an instructor qualification and over 14 years of experience building scalable web applications with Symfony and Shopware. When not coding, Thomas volunteers as a lifeguard with the Wasserwacht, performs as a DJ, and explores the countryside on his motorbike.

Kommentare

Kommentare werden von Remark42 bereitgestellt. Beim Laden werden Daten an unseren Kommentar-Server übertragen.