Skip to content

Plugin Base Guide

Plugin Base Guide ​

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 ​

  1. Create the plugin structure
  2. Install and activate the plugin
  3. Understand the plugin lifecycle
  4. Add plugin configuration
  5. Register services and use dependency injection
  6. Listen to events or decorate services
  7. Extend the platform (either or both): Storefront, Administration
  8. Add database migrations (if required)
  9. Add scheduled tasks or CLI commands (if required)
  10. Add dependencies: npm, Composer (if required)
  11. Write tests and configure CI
  12. Add diagnostics

Tooling ​

Most steps above can be generated instead of written by hand:

  • bin/console plugin:create scaffolds the plugin; see the Creating Plugins guide
  • The Shopware 6 Toolbox plugin generates plugins, subscribers, scheduled tasks, migrations, and Administration modules from PHPStorm, using file templates you can adapt to your own conventions

When a generator creates an optional feature, the files it produces are usually parts of one piece of framework wiring. For example, a generated controller can depend on both route configuration and service registration, while a scheduled task has separate task and handler roles. The focused guides explain those pieces in context; you do not normally need to reproduce the wiring manually.

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.

Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)