Skip to content

extension create: Move Core plugin scaffolding generators from Core #1280

Description

Move the existing plugin scaffolding from shopware/shopware/src/Core/Framework/Plugin/Command/Scaffolding into Shopware CLI.

The generators should be exposed individually instead of through the existing plugin:create questionnaire.

Compatibility: the minimum version for the full clean generator set is Shopware 6.7.13.0.

Generator review

Generator Current Core command Last relevant change Treatment
AdminModuleGenerator make:plugin:admin-module 2026-04-22 a5bc729c: en-GB/de-DEen/de additive
CommandGenerator make:plugin:command 2026-07-27 42998569: XML → PHP registration additive
ComposerGenerator make:plugin:composer 2025-08-20 c35b1a97: composer/namespace handling #1274 foundation
ConfigGenerator make:plugin:config 2025-01-21 14370ace: annotation only additive
CustomFieldsetGenerator make:plugin:custom-fieldset 2026-06-24 cc226a48: installer/lifecycle → declarative custom-fields.xml additive, >=6.7.13.0
EntityGenerator make:plugin:entity 2026-08-12 daf7b4e6: preserve existing files/migrations additive; port preservation semantics
EventSubscriberGenerator make:plugin:event-subscriber 2026-07-27 42998569: XML → PHP additive
GitignoreGenerator make:plugin:gitignore 2025-10-06 f2e28d3c: add .gitignore #1274 foundation
JavascriptPluginGenerator make:plugin:javascript-plugin 2025-01-21 14370ace: annotation only additive
PluginClassGenerator make:plugin:plugin-class 2025-01-21 14370ace #1274 foundation; don't port current lifecycle-heavy stub
ScheduledTaskGenerator make:plugin:scheduled-task 2026-07-27 42998569: XML → PHP additive
StoreApiRouteGenerator make:plugin:store-api-route 2026-07-27 42998569: PHP services/routes additive
StorefrontControllerGenerator make:plugin:storefront-controller 2026-07-27 42998569: XML → PHP additive
TestsGenerator make:plugin:tests 2025-08-20 c35b1a97 needs decision: generated bootstrap uses addActivePlugins() / setForceInstallPlugins(true)
AddScaffoldConfigDefaultBehaviour / HasCommandOption / ScaffoldingGenerator 2025-01-21 14370ace internal infrastructure

CustomFieldsetGenerator sets the compatibility floor: through 6.7.12.1 it generated an installer, service registration, lifecycle hooks and repository operations. cc226a48 replaced these with declarative Resources/config/custom-fields.xml.

The July XML → PHP changes do not raise the floor; PHP configuration is supported by 6.7.13. The August EntityGenerator preservation behavior is CLI-side safety and should be ported independently of the runtime target.

Do not copy the stub directory wholesale: plugin-class.stub still contains lifecycle hooks, and plugin-class-with-custom-fields.stub is obsolete for this ownership model.

Acceptance criteria / checks

  • Additive generators are available individually through Shopware CLI.
  • Full-generator compatibility is >=6.7.13.0; unsupported targets fail clearly.
  • composer.json, .gitignore and a minimal plugin class stay in Create a minimal, valid plugin with extension create #1274 and are not exposed as post-create generators.
  • Port current templates plus daf7b4e6 preservation/idempotency behavior.
  • Existing files follow defined skip/append/fail semantics; user code is never overwritten and services.php / routes.php are not duplicated.
  • Decide whether TestsGenerator's test-runtime lifecycle behavior is within the extension create: Consolidate plugin and theme creation and scaffolding in Shopware CLI #1255 boundary; otherwise exclude/redesign it.
  • Interactive and non-interactive invocation produce equivalent artifacts for the same inputs.
  • Intentional differences from Core are documented and tested.
  • Implement telemetry (Grafana) so we can measure generator usage.
  • Tests cover supported generator/version combinations.
  • After migration, shopware-cli owns the migrated templates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Fields

No fields configured for Improvement.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions