Skip to content

Decouple plugin:create scaffolding from Shopware Core and simplify CLI UX #872

@lasomethingsomething

Description

User Story

As a developer, I want to generate plugin scaffolding independently of the Shopware Core version, so that I do not need to upgrade Shopware just to receive scaffolding fixes and can use the scaffolding across older Shopware versions.

Current State (Technical Context)

  • Scaffolding is currently run via bin/console plugin:create.
  • The command is registered in DI and uses tagged scaffold generators.
  • Multiple generators dynamically extend options and questions.
  • Generators are interactive and rely on CLI confirmations.
  • Maker-based partial scaffolding already exists via make:*.
  • Non-interactive mode currently has UX issues, including cases such as infinite loops.
  • The command asks many questions during setup.
  • Users often do not understand the consequences of individual choices or whether a feature can be added later.

Problems

  • Scaffolding is tightly coupled to Shopware Core, so fixes require a Shopware upgrade.
  • The interactive flow is too question-heavy and can feel overwhelming.
  • Users lack clarity about the impact of certain options.
  • There is no clear feedback loop after scaffold generation.
  • App scaffolding is incomplete.
  • Plugin scaffolding is only partially modular.
  • It is unclear how widely the current feature is used.

Goals

  1. Decouple scaffolding from Shopware Core

    • Provide scaffolding through a standalone PHP package or through shopware-cli.
    • Keep the Core command available; removal is not required.
  2. Make scaffolding version-independent

    • Ensure it can be used with older Shopware versions.
    • Avoid requiring a Core rebuild or upgrade for scaffolding-related fixes.
  3. Simplify the UX

    • Reduce the number of interactive questions.
    • Prefer explicit flags over confirmation prompts.
    • Improve discoverability through a clear --help output.
    • Clarify the consequences of selected options.
    • Make non-interactive mode fully deterministic.
  4. Improve modularity

    • Separate the base scaffold from optional features.
    • Enable optional features explicitly through flags.
    • Avoid hidden cascading questions.
    • Either align with the make:* pattern, or deliberately avoid expanding maker-style commands and instead focus on one clear entry point such as shopware plugin create.
    • Keep the command surface minimal and predictable.
  5. Introduce a CLI feedback loop

    • Optionally prompt for feedback or a survey after scaffold generation.

Acceptance Criteria

  • Scaffolding is available independently of the Shopware Core version.
  • Generated templates include schema JSON files so developers know they should update them when changing plugin APIs.
  • Scaffolding works for older Shopware versions.
  • Interactive prompts are reduced or optional.
  • --help clearly lists all available scaffold features and options.
  • Non-interactive mode behaves predictably and does not loop.
  • App scaffolding parity is defined and any gaps are documented.
  • A CLI feedback mechanism is implemented.
  • The existing plugin:create command remains functional.

Out of Scope

  • Removing plugin:create
  • Refactoring the entire generator architecture
  • Backporting large structural changes into Core

Related

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Story.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions