Plugin Base Guide
Overview
This guide outlines the typical development flow when creating a Shopware plugin, using the recommended static plugin approach. Core concepts apply to all plugin types. Not every plugin requires all steps.
Typical plugin development flow
- Create the plugin structure
- Install and activate the plugin
- Understand the plugin lifecycle
- Add plugin configuration
- Register services and use dependency injection
- Listen to events or decorate services
- Extend the platform (either or both): Storefront, Administration
- Add database migrations (if required)
- Add scheduled tasks or CLI commands (if required)
- Add configuration: npm, Composer (if required)
- Write tests: CI and upgrade safety: Configure CI to run static analysis, tests, and produce reproducible artifacts to avoid upgrade regressions.
- Add diagnostics
Upgrade readiness
Design plugins so that:
- Migrations are idempotent
- Lifecycle logic is minimal and predictable
- Domain logic is encapsulated behind services
Upgrades are easier when the plugin surface area is small and well-structured.
Getting started
The first step is to create the plugin structure.