Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f4c7b62
feat(cli): document new Docker-based development environment
shyim May 18, 2026
f7c1925
docs(cli): emphasize compose.override.yaml pattern for managed compos…
shyim May 18, 2026
08f221f
docs: move dev environment into development guide as default workflow
shyim May 18, 2026
e924682
chore: add new terms to spellcheck wordlist, fix markdown linting
shyim May 18, 2026
4ab0c30
docs: expand setup wizard into full migration guide for legacy projects
shyim May 18, 2026
7fb3561
docs(cli): document dev status command
shyim Jun 30, 2026
830956a
Updates to docs
tturkowski Jul 7, 2026
2100d63
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
68ace43
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
5a82dc5
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
c4d30cb
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
30d6b19
Update products/tools/cli/project-commands/helper-commands.md
lasomethingsomething Jul 7, 2026
d714602
Update guides/development/start-developing.md
lasomethingsomething Jul 7, 2026
7194252
Update guides/development/start-developing.md
lasomethingsomething Jul 7, 2026
0a55df6
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
09d93b6
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
11ca185
Update guides/development/dev-environment.md
lasomethingsomething Jul 7, 2026
c732da1
Merge pull request #2373 from shopware/feat/cli-dev-environment-docs-…
lasomethingsomething Jul 8, 2026
d1f19ce
Update start-developing.md
lasomethingsomething Jul 8, 2026
d08c3e8
Update dev-environment.md
lasomethingsomething Jul 8, 2026
76cde53
Apply suggestions from code review
shyim Jul 8, 2026
5705c40
Update development environment documentation and wordlist
shyim Jul 9, 2026
bc3d552
Merge origin/main into feat/cli-dev-environment-docs
shyim Jul 9, 2026
73158a4
Fix punctuation in development documentation for consistency
shyim Jul 9, 2026
7cf5188
Fix typo in configuration file name in development documentation
shyim Jul 9, 2026
b02958c
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
b84c735
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
79d79fc
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
2f32403
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
f40de2a
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
7a7d3cb
Update guides/development/dev-environment.md
sushmangupta Jul 9, 2026
4a4c37d
Update guides/development/index.md
sushmangupta Jul 9, 2026
7339ce0
Update guides/installation/index.md
sushmangupta Jul 9, 2026
324fd61
Update guides/installation/project-overview.md
sushmangupta Jul 9, 2026
176bf41
fix: remove extra space in heading in dev-environment.md (MD019)
Copilot Jul 9, 2026
9ee3f3b
Update dev-environment.md
lasomethingsomething Jul 10, 2026
c7ef424
Update dev-environment.md
lasomethingsomething Jul 10, 2026
10fc6c3
Update start-developing.md
lasomethingsomething Jul 10, 2026
2433021
Update helper-commands.md
lasomethingsomething Jul 10, 2026
4b5e4a1
Merge branch 'main' into feat/cli-dev-environment-docs
lasomethingsomething Jul 10, 2026
28bd0ec
Merge branch 'main' into feat/cli-dev-environment-docs
sushmangupta Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ Deployer
Deprecations
Deutsch
DevOps
DevTUI
Comment thread
shyim marked this conversation as resolved.
DevTools
Devenv
DeviceHelper
Expand Down Expand Up @@ -540,6 +541,7 @@ LONGTEXT
LUA
LandingPage
LastNameRule
LavinMQ
Lerna
Lifecycle
LineItemClearanceSaleRule
Expand Down Expand Up @@ -1023,6 +1025,8 @@ TCP
TLS
TTL
TTLs
TUI
TUI's
TaxFreeConfigField
TaxProvider
TaxProviderStruct
Expand Down Expand Up @@ -1180,6 +1184,7 @@ actionAmount
actionType
actionability
activateShopwareTheme
adminer
adr
afterSort
ag
Expand Down Expand Up @@ -1636,8 +1641,10 @@ jwks
jwt
kebabCase
keyframes
keypress
landingpage
lang
lavinmq
lazysizes
libxml
lifecycle
Expand Down Expand Up @@ -1762,6 +1769,7 @@ org's
organizationUnitIds
otel
otlp
overridable
overrideComponentSetup
oversales
paas
Expand Down Expand Up @@ -1903,6 +1911,7 @@ rollout
routeName
routeScope
routeScopes
runnable
runtime
runtimes
salesChannel
Expand Down Expand Up @@ -2140,6 +2149,7 @@ wishlist
wordlist
www
xasjkyld
xdebug
xhost's
xkeys
xl
Expand Down
325 changes: 325 additions & 0 deletions guides/development/dev-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
---
nav:
title: Development Environment
position: 3

---

# Development Environment

Shopware CLI provides a fully integrated Docker-based development environment. A single command launches your entire stack, streams logs, manages watchers, and lets you configure PHP and profiling - all without manually editing Docker files.

:::info
The development environment requires a compatibility date of `2026-03-01` or later in your `.shopware-project.yml`. Projects created with `shopware-cli project create` have this set automatically.
:::

## Starting the environment

From your Shopware project root, run:

```bash
shopware-cli project dev
```

This launches the development terminal user interface (TUI). If your containers aren't running yet, the dashboard starts them. If Shopware hasn't been installed, it guides you through the installation wizard.

To start without the interactive dashboard (for CI or scripting):

```bash
shopware-cli project dev start
```

To check whether the environment is running:

```bash
shopware-cli project dev status
```

To stop everything:

```bash
shopware-cli project dev stop
```

## Development terminal user interface (TUI)

The dashboard has three tabs, which can be switched to with the corresponding number key or by using the Tab button.

### 1. Overview Tab

Your environment at a glance:

**Left panel:**

- **Shop** - Shopware version, environment type (`docker`, `local`, or `symfony-cli`), shop and admin URLs, and security update expiry date
- **Access** - URLs, usernames, and passwords for Shop Admin, Adminer, and Mailpit
- **Setup health** - runtime checks (PHP version, memory limit), local behavior warnings, and debug settings, each showing the current value against the recommended one

**Right panel:**

- **Watchers** - toggle Admin and Storefront watchers on or off

### 2. Instance Tab

Browse and stream logs from your running environment:

- **Containers** - all Docker containers with a live status indicator for the active one
- **Processes** - watcher processes (Admin Watcher, Storefront Watcher) when running
- **Log files** - application log files (e.g., `dev.log`)

Use the sidebar to switch sources. Toggle follow mode with `Enter`.

### 3. Config Tab

The following table lists the settings you can change in the Config tab:
| Setting | Options |
|---------|---------|
| **PHP Version** | `8.2`, `8.3`, `8.4`, `8.5` |
| **Profiler** | `none`, `xdebug`, `blackfire`, `tideways`, `pcov`, `spx` |

When selecting `blackfire` or `tideways`, additional credential fields appear. Sensitive credentials are stored in `.shopware-project.local.yml` (excluded from version control).

:::info
The profiler is now configured via the Config tab.
:::

After changing settings, select **Save & Regenerate** to update `compose.yaml`. Restart the environment for changes to take effect.

## Migrating from legacy setups

If your project was created before March 2026 and uses the older `make up`/`make setup` workflow with a hand-written `compose.yaml`, running `shopware-cli project dev` automatically detects this and launches a setup wizard instead of the dashboard.

Check warning on line 90 in guides/development/dev-environment.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/development/dev-environment.md#L90

This word is normally spelled as one. (EN_COMPOUNDS_HAND_WRITTEN) Suggestions: `handwritten` Rule: https://community.languagetool.org/rule/show/EN_COMPOUNDS_HAND_WRITTEN?lang=en-US Category: MISC
Raw output
guides/development/dev-environment.md:90:104: This word is normally spelled as one. (EN_COMPOUNDS_HAND_WRITTEN)
 Suggestions: `handwritten`
 Rule: https://community.languagetool.org/rule/show/EN_COMPOUNDS_HAND_WRITTEN?lang=en-US
 Category: MISC

### What triggers the wizard

The wizard appears when your project's `compatibility_date` in `.shopware-project.yml` is before `2026-03-01` (or missing entirely). This signals that the project hasn't been configured for the new development environment yet.

### What the wizard does

Walking through the setup wizard takes about a minute. Here's what happens at each step:

1. **Welcome** - explains what the wizard will do and asks you to proceed
2. **Admin user** - pre-fills `admin` (you can change it) for the Shopware admin account
3. **Admin password** - pre-fills `shopware` (you can change it); stored as credentials in `.shopware-project.yml`
4. **PHP version** - reads your `composer.lock` to determine compatible PHP versions and offers the highest supported one as the default (e.g., `8.5`)

After you confirm, the wizard:

- Sets `compatibility_date` to `2026-03-01` in `.shopware-project.yml`
- Adds a `local` environment with type `docker` and your chosen URL/credentials
- Configures the Docker PHP version
- Generates a new `compose.yaml` tailored to your project's dependencies
- Starts the Docker containers and runs the Shopware installer

### What happens to existing files

| File | What changes |
|------|-------------|
| `.shopware-project.yml` | Updated with `compatibility_date`, `environments`, and `docker` config |
| `.shopware-project.local.yml` | Created if you chose a profiler with credentials (Blackfire, Tideways) |
| `compose.yaml` | **Replaced** with the CLI-managed version - your old file is overwritten, so back it up first and move any customizations to `compose.override.yaml` |
| `Makefile` | **Not touched** - you can delete it once you've migrated, or keep it around |
| `composer.json` | If `shopware/deployment-helper` isn't already present, it's added to `require` |
Comment thread
Copilot marked this conversation as resolved.

### After the wizard completes

If `shopware/deployment-helper` was added to `composer.json`, you'll be prompted to run:

```bash
composer install
```

This pulls in the helper package, which the dashboard uses to run the Shopware installer. After that, the environment starts automatically.

Once migrated, the legacy `make up`/`make down`/`make setup` workflow is no longer needed; use `shopware-cli project dev` to manage your environment instead. If you had customizations in your old `compose.yaml`, move them to `compose.override.yaml` before running the wizard (or recover them from git afterwards).

Check warning on line 133 in guides/development/dev-environment.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/development/dev-environment.md#L133

In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects. (AFTERWARDS_US[1]) Suggestions: `afterward` Rule: https://community.languagetool.org/rule/show/AFTERWARDS_US?lang=en-US&subId=1 Category: BRITISH_ENGLISH
Raw output
guides/development/dev-environment.md:133:301: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects. (AFTERWARDS_US[1])
 Suggestions: `afterward`
 Rule: https://community.languagetool.org/rule/show/AFTERWARDS_US?lang=en-US&subId=1
 Category: BRITISH_ENGLISH

## Viewing application logs

Inspect Shopware logs without opening the dashboard:

```bash
# Last 100 lines of the most recently modified log
shopware-cli project logs

# A specific log file
shopware-cli project logs dev-2026-05-18.log

# Follow the log (like tail -f)
shopware-cli project logs -f

# List available log files
shopware-cli project logs -l

# Set number of lines
shopware-cli project logs --lines 50
```

## Running Shopware commands

Use `shopware-cli project console` to run `bin/console` commands from your host - no need to shell into the container:

```bash
shopware-cli project console cache:clear
shopware-cli project console plugin:refresh
shopware-cli project console dal:refresh:index
```

When using the Docker executor, commands automatically run inside the web container via `docker compose exec`.

To type a little less, you can also use the `swx` alias as a shortcut for `shopware-cli project console`:

```bash
swx cache:clear
swx plugin:refresh
swx dal:refresh:index
```

## Docker services

The CLI generates a `compose.yaml` tailored to your project:

| Service | Description | URL |
|---------|-------------|-----|
| **web** | PHP + Node.js with Caddy | `http://127.0.0.1:8000` |
| **database** | MariaDB 11.8 | internal |
| **adminer** | Database management UI | `http://127.0.0.1:9080` |
| **mailer** | Mailpit (email testing) | `http://127.0.0.1:8025` |
| **lavinmq** | Message queue * | `http://127.0.0.1:15672` |
| **opensearch** | Search engine * | `http://127.0.0.1:9200` |
| **blackfire** | Blackfire agent * | internal |
| **tideways-daemon** | Tideways agent * | internal |

\* *Auto-detected from `composer.lock` or enabled via configuration.*

::: warning
The `compose.yaml` file is fully managed by the Shopware CLI and regenerated whenever you change configuration. **Never edit it directly.**
:::

### Customizing with `compose.override.yaml`

Place all customizations in `compose.override.yaml`. Docker Compose [merges multiple files](https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/), so your overrides are applied on top of the managed file:

```yaml
# compose.override.yaml
services:
web:
environment:
APP_ENV: dev
COMPOSER_HOME: /tmp/composer
ports:
- "9003:9003" # Xdebug

# Add your own services
redis:
image: redis:7-alpine
ports:
- "6379:6379"
```

The CLI-generated `compose.yaml` includes this header for clarity:

```yaml
# This file is managed by shopware-cli. Do not edit manually.
# Create a compose.override.yaml to customize services.
```

### Auto-Detection

The compose file inspects your `composer.lock` at generation time:

- `symfony/amqp-messenger` - adds **LavinMQ** and sets `MESSENGER_TRANSPORT_DSN`
- `shopware/elasticsearch` - adds **OpenSearch** with environment variables
- PHP version defaults to `8.3`, overridable in the Config tab

## Environment executors

The CLI abstracts command execution across environment types, configured per environment in `.shopware-project.yml`:

| Type | Behavior |
|------|----------|
| `docker` | Executes commands inside the web container via `docker compose exec` |
| `local` | Executes commands directly on the host |
| `symfony-cli` | Uses the Symfony CLI binary (auto-detected) |

```yaml
environments:
local:
type: docker
url: http://127.0.0.1:8000
admin_api:
username: admin
password: shopware
```

## Ports

The web container exposes these ports by default:

| Port | Purpose |
|------|---------|
| `8000` | Storefront |
| `8080` | HTTP (alternative) |
| `5173` | Admin Watcher (Vite) |
| `9998` | Storefront Watcher |
| `9999` | Storefront Proxy |
| `5773` | IDE debugging |

## Configuration reference

### `.shopware-project.yml`

```yaml
compatibility_date: '2026-03-01'

url: http://127.0.0.1:8000

docker:
php:

Check warning on line 276 in guides/development/dev-environment.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/development/dev-environment.md#L276

File types are normally capitalized. (FILE_EXTENSIONS_CASE[1]) Suggestions: `PHP` URL: https://languagetool.org/insights/post/spelling-capital-letters/ Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1 Category: CASING
Raw output
guides/development/dev-environment.md:276:2: File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
 Suggestions: `PHP`
 URL: https://languagetool.org/insights/post/spelling-capital-letters/ 
 Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
 Category: CASING
version: "8.3" # 8.2, 8.3, 8.4, 8.5
profiler: xdebug # none (empty), xdebug, blackfire, tideways, pcov, spx
blackfire_server_id: "" # required when profiler is blackfire

Check warning on line 279 in guides/development/dev-environment.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/development/dev-environment.md#L279

Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE) Suggestions: `blackfire` Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US Category: MISC
Raw output
guides/development/dev-environment.md:279:60: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
 Suggestions: `blackfire`
 Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
 Category: MISC
blackfire_server_token: "" # required when profiler is blackfire
tideways_api_key: "" # required when profiler is tideways

environments:
local:
type: docker
url: http://127.0.0.1:8000
admin_api:
username: admin
password: shopware
```

### `.shopware-project.local.yml`

Sensitive credentials are stored in `.shopware-project.local.yml` (add to `.gitignore`):

```yaml
docker:
php:

Check warning on line 298 in guides/development/dev-environment.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/development/dev-environment.md#L298

File types are normally capitalized. (FILE_EXTENSIONS_CASE[1]) Suggestions: `PHP` URL: https://languagetool.org/insights/post/spelling-capital-letters/ Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1 Category: CASING
Raw output
guides/development/dev-environment.md:298:2: File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
 Suggestions: `PHP`
 URL: https://languagetool.org/insights/post/spelling-capital-letters/ 
 Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
 Category: CASING
blackfire_server_id: "your-server-id"
blackfire_server_token: "your-server-token"
```

## Troubleshooting

### `compose.yaml` keeps getting reset

This is by design. `compose.yaml` is fully managed and regenerated on config changes. Use `compose.override.yaml` for all customizations. See [Customizing with compose.override.yaml](#customizing-with-composeoverrideyaml).

### Containers won't start

Check logs with `shopware-cli project logs -f` or from the Instance tab in the TUI.

### Shopware isn't installed

The development TUI's initialization wizard, which mirrors steps in Shopware's in-browser First Run Wizard, prompts you to run the installer. It uses `shopware/deployment-helper` to install Shopware with your chosen locale, currency, and Admin credentials.

### Compatibility date error

Set `compatibility_date: '2026-03-01'` in `.shopware-project.yml`. For more context, see the [build command docs](../../products/tools/cli/project-commands/build.md#compatibility-date).

## Next steps

- [Start Developing](./start-developing.md) - What to do once your environment is running
- [Build Extensions](./extensions/index.md) - Create plugins, apps, and themes
- [Using Watchers](./tooling/using-watchers.md) - Hot Module Replacement for Admin and Storefront
Loading
Loading