Skip to content

feat(shopware6): bundle shopware-cli and hot-reload watchers - #8597

Merged
rfay merged 8 commits into
ddev:mainfrom
vanWittlaer:bundle-shopware-cli-with-shopware6-project-type
Aug 18, 2026
Merged

rfay merged 8 commits into
ddev:mainfrom
vanWittlaer:bundle-shopware-cli-with-shopware6-project-type

Conversation

@vanWittlaer

@vanWittlaer vanWittlaer commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

The Issue

Shopware's standard tooling nowadays is shopware-cli. Currently requires manual install or add-on. Also, special configuration is required for using Shopware's storefront and admin watchers.

How This PR Solves The Issue

Make the functionality of the ddev-shopware-cli add-on available to shopware6 projects without a separate install: bake the shopware-cli binary into the web image, expose the watcher ports, and ship the watcher commands.

  • config.go: bake the shopware-cli binary into the web image for shopware6 projects via COPY --from=shopware/shopware-cli:bin
  • shopware6.go: expose the watcher ports (5173/9998/9999) via configOverrideAction, idempotently and without clobbering user ports
  • commands/web/{shopware-cli,admin-watch,storefront-watch}: bundled web commands gated to shopware6 via "## ProjectTypes". They call the binary by absolute path (no PATH recursion) and set the watcher env (PROXY_URL from the live DDEV_PRIMARY_URL) at runtime rather than via fragile web_environment
  • shopware6_test.go: tests for the port override (idempotency, user-value preservation) and the Dockerfile binary injection

Targets Shopware 6.7.4.2+ (Vite admin on 5173).

Notes
a) One potential problem could be the frequent changes to the watchers made by Shopware, which in the past have even been implemented between minor versions without regard for backwards compatibility. Another major change has been announced for the next major version, 6.8. This could become an issue, as in practice we must assume that projects running on major versions n-1 and n-2 will remain in use for extended periods.
b) The image bundled is shopware/shopware-cli:bin-0.16.7, it is pinned by default to a (more or less) arbitrary version 0.16.7 in lack of a clear release policy at this time.

Manual Testing Instructions

  1. Create a new Shopware project following the quickstart guide:
    https://docs.ddev.com/en/stable/users/quickstart/#shopware
    • if being asked 'Do you trust "php-http/discovery" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json)' type 'n'
    • skip the launch admin step at this time (see below)
  2. Install a plugin that actually extends Shopware's admin and storefront
    • mkdir custom/plugins/FroshAltchaCaptcha
    • curl -L https://github.com/FriendsOfShopware/FroshAltchaCaptcha/archive/refs/tags/1.9.0.tar.gz | tar xz --strip-components=1 -C custom/plugins/FroshAltchaCaptcha
    • ddev exec bin/console plugin:refresh
    • ddev exec bin/console plugin:install --activate -c FroshAltchaCaptcha
    • ddev exec shopware-cli project admin-build (not stricly required for testing, but recommended to see plugin active in admin)
  3. Launch admin and execute the first run wizard
    • ddev launch /admin
    • Note the admin credentials are 'admin' and 'shopware'
    • Data import - install demo data
    • Default values - just click "Next"
    • Mailer configuration - "Configure later"
    • PayPal setup - "Skip"
    • Extensions - "Next"
    • Shopware Account - "Skip"
    • Shopware Store - "Skip"
    • Click "Finish" to complete the first run wizard
    • go to Settings -> Basic information, scroll to the bottom to the Captcha section
    • add the AltchaCaptcha and click 'Save'
  4. Start and test the admin watcher
    • ddev admin-watch custom/plugins/FroshAltchaCaptcha
    • note the url advised by the watcher, e.g. 'Admin Watcher started at https://test.ddev.site:5173/admin'
    • point your browser to this url
    • go to Settings -> Basic information, scroll to the bottom to the Captcha section
    • note AltchaCaptcha settings underneath the captcha selection input field
    • in your IDE, edit the file custom/plugins/FroshAltchaCaptcha/src/Resources/app/administration/src/core/modules/sw-settings-basic-information/component/sw-settings-captcha-select-v2/sw-settings-captcha-select-v2.html.twig
    • watch the browser update automatically
  5. Start and test the storefront watcher

Automated Testing Overview

In shopware6_test.go, TestShopware6ConfigOverrideAction verifies that the shopware6 project type exposes the shopware-cli watcher ports through the real app-type matrix (ConfigFileOverrideAction), that it is idempotent, and that it never clobbers a user's own port settings.

Release/Deployment Notes

n.a.

@vanWittlaer
vanWittlaer requested review from a team as code owners July 17, 2026 15:26
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file enhancement labels Jul 17, 2026
@vanWittlaer

Copy link
Copy Markdown
Contributor Author

@rfay @stasadev for discussion, does it make sense at all? Your feedback welcome.

@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this and for your expertise with shopware!

@vanWittlaer
vanWittlaer force-pushed the bundle-shopware-cli-with-shopware6-project-type branch from f96daf8 to 7840967 Compare July 20, 2026 09:37
@vanWittlaer

Copy link
Copy Markdown
Contributor Author

Thanks for your feedback, both should be resolved now.

@vanWittlaer
vanWittlaer requested a review from rfay July 20, 2026 12:34

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job working on this! It's pretty fragile as-is, but I know you'll push it better.

  • Use the released shopware CLI, not the dockerhub image, for the source
  • Don't use fragile literal version numbers
  • If possible, let's not wire the ports in there, as that's much too fragile. DDEV allocates ports just fine using web_extra_exposed_ports, and those ports are available. Assuming that these are HTTP/S (I think they are) then you they'll just be bound on the router.

Comment thread docs/tests/shopware.bats Resolved
Comment thread docs/tests/shopware.bats

# admin-watch validates its args (and thus actually runs in-container) without
# starting the long-running Vite server.
run ddev admin-watch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty good. If there's any way to actually validate admin-watch doing something it would be even better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid this will be rather difficult, as this admin-watch requires a plugin installed that a) actually extends Shopware admin and b) is conformant with the watcher requirements. Shopware's plugin SwagPayPal, which is shipped by default, does not fulfill b) itself. So running admin-watch would require to install an arbitraty plugin compatible plugin first, adding one more dependency. Is it worth it?

Comment thread pkg/ddevapp/shopware6_test.go Outdated
// findWebExposedPort returns the WebExposedPort with the given container port,
// or nil if none is present. Used to assert on the watcher ports added by the
// shopware6 configOverrideAction.
func findWebExposedPort(ports []ddevapp.WebExposedPort, containerPort int) *ddevapp.WebExposedPort {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we should already have direct access to this. What are we trying to accomplish here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's coupled to the ports issue, postponed

Comment thread docs/content/users/quickstart.md Resolved
Comment thread pkg/ddevapp/config.go Resolved
Comment thread pkg/ddevapp/shopware6.go
// Targets Shopware 6.7.4.2+ (Vite admin on 5173); see the bundled commands/web
// watchers.
func shopware6ConfigOverrideAction(app *DdevApp) error {
watcherPorts := []WebExposedPort{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right way to do this, and these ports are inappropriate. (9999 is used quite a lot of places).

Why don't we use the actual automatic port, like so many of the custom commands do?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely do not use 9999/9998. Are those recommended somewhere? They just have so many conflicts. It doesn't matter what the port is inside teh container, but the one used on the host should be something not terribly likely to have a conflict.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any alternative port ranges in mind? 10520 ff.?

I can confirm that Shopware uses and documents the values 9998/9999. But yes, they can be customised (with definitions in several places). I’ve been using these ports for years with DDEV; Shopware developers are used to them, and I’ve never had any problems with them nor heard of any complaints.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how best to deal with this, but at least it should be possible to get around it with environment variables.

Comment thread pkg/ddevapp/shopware6_test.go Resolved
@vanWittlaer

vanWittlaer commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor Author
  • If possible, let's not wire the ports in there, as that's much too fragile. DDEV allocates ports just fine using web_extra_exposed_ports, and those ports are available. Assuming that these are HTTP/S (I think they are) then you they'll just be bound on the router.

Can you please clarify?

  1. drop the programmatic injection and document a web_extra_exposed_ports snippet to be pasted into config.yaml by user?
  2. keep auto-injecting the web_extra_exposed_ports entries but stop hardcoding the mismatched host http_port/https_port literals (e.g. let https_port == container_port and drop the odd http values)?
  3. Something else?

@vanWittlaer

Copy link
Copy Markdown
Contributor Author
  • Use the released shopware CLI, not the dockerhub image, for the source
  • Don't use fragile literal version numbers
  • If possible, let's not wire the ports in there, as that's much too fragile. DDEV allocates ports just fine using web_extra_exposed_ports, and those ports are available. Assuming that these are HTTP/S (I think they are) then you they'll just be bound on the router.

@rfay I have updated the PR following your suggestions 1 and 2. With 3 (ports) I need your help please to better understand your point.

@vanWittlaer
vanWittlaer requested a review from rfay July 21, 2026 08:19
@rfay

rfay commented Jul 21, 2026

Copy link
Copy Markdown
Member

Sorry I hadn't responded yet to your specfics, I just have to spend a little more time with it.

I sure liked that you optionally added the CLI into the web container instead of always adding it like we've done in the regular Dockerfile build.

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe GitHub is leading me astray, but it just seemed like you marked all my comments as resolved but they weren't resolved.

I'll try manual testing this now.

Comment thread docs/content/users/quickstart.md Resolved
Comment thread docs/content/users/quickstart.md Resolved
Comment thread pkg/ddevapp/config.go Resolved
Comment thread pkg/ddevapp/shopware6.go
// Targets Shopware 6.7.4.2+ (Vite admin on 5173); see the bundled commands/web
// watchers.
func shopware6ConfigOverrideAction(app *DdevApp) error {
watcherPorts := []WebExposedPort{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely do not use 9999/9998. Are those recommended somewhere? They just have so many conflicts. It doesn't matter what the port is inside teh container, but the one used on the host should be something not terribly likely to have a conflict.

Comment thread pkg/ddevapp/shopware6_test.go Resolved
@rfay

rfay commented Jul 21, 2026

Copy link
Copy Markdown
Member

I need more help with the manual testing instructions. Remember I'm a Shopware novice.

Setup a Shopware project, run the first-run-wizzard. Install SwagPayPal for later test of admin watcher. Test ddev shopware-cli --version. You may also want to test ddev storefront-watch and ddev admin-watch (the latter one however requires a plugin to be installed, SwagPayPal will do).

I have no idea what SwagPayPal is or how to install it. Please give explicit step-by-step instructions (edit the OP) and start with a quickstart-based instruction, refer to https://ddev--8597.org.readthedocs.build/en/8597/users/quickstart/#shopware

Your OP testing instructions should also refer to https://ddev--8597.org.readthedocs.build/en/8597/users/quickstart/#shopware-cli-and-hot-reload-watchers

(And anything else you added)

vanWittlaer added a commit to vanWittlaer/ddev that referenced this pull request Jul 22, 2026
…nd tests

Address PR review feedback (ddev#8597):

- config.go/shopware6.go: install shopware-cli from its official GitHub
  release (version-less "latest" asset) instead of COPY --from the DockerHub
  image, avoiding DockerHub pull limits and a pinned version literal
- shopware6.go: extract the release tarball with tar --no-same-owner (+ chmod
  0755) so the binary is owned by root:root like every other tool in
  /usr/local/bin, not the goreleaser build uid (1001:1001)
- versionconstants.go: drop the now-unused ShopwareCLIImage constant (it was
  neither a floating ref nor an image reference anymore)
- shopware.bats: assert a version-shaped string via --regexp rather than a
  hardcoded version literal
- shopware6_test.go: remove TestShopware6WebImageDockerfile; the bundled
  binary is validated in-container by the bats `ddev shopware-cli --version`
  check, which is the correct level rather than asserting on Dockerfile text
- quickstart.md: point the shopware-cli link at the GitHub project, not the
  DockerHub image page

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions github-actions Bot removed the dependencies Pull requests that update a dependency file label Jul 22, 2026
@vanWittlaer

Copy link
Copy Markdown
Contributor Author

Hmm, maybe GitHub is leading me astray, but it just seemed like you marked all my comments as resolved but they weren't resolved.

I'll try manual testing this now.

Sorry, I apologise for wasting your time, missed the push - it should be up by now.

I am working on the manual test instructions, so please hold on.

@vanWittlaer

Copy link
Copy Markdown
Contributor Author

I need more help with the manual testing instructions. Remember I'm a Shopware novice.

You are absolutely right. I updated the manual testing instructions. But ....

... while working this out, I noticed shopware-cli:latest that is 0.16.9 has a bug in admin-watch (see shopware/shopware-cli#1233). So no point for you to continue with the testing, unless you replace shopware-cli with 0.16.7 (or wait for the fix).

What is the correct way to handle this?

  • pin to a stable version
  • continue with latest
  • ?

@vanWittlaer

Copy link
Copy Markdown
Contributor Author

@rfay A quick update: Shopware has fixed the issue with the admin watcher (I was able to test the fix), but not yet released. I expect it for early next week and shall let you know.

If you could provide some feedback on the following two points:
a) Whether to continue using the latest version of shopware-cli or to specify a specific version
b) The port range for the Storefront Watchers (instead of 9998/9999)
I would be happy to finalise and close the PR.

@rfay

rfay commented Jul 24, 2026

Copy link
Copy Markdown
Member

I'm going to prefer the latest stable version of the CLI, it just makes long term management better.

I'll suggest alternate ports when I review, unless you think the 9999 is really important to use.

If you don't mind, can I wait for the upstream fix to be released before next review?

@vanWittlaer

Copy link
Copy Markdown
Contributor Author

If you don't mind, can I wait for the upstream fix to be released before next review?

Yes, of course, there’s no rush

vanWittlaer added a commit to vanWittlaer/ddev that referenced this pull request Jul 24, 2026
…nd tests

Address PR review feedback (ddev#8597):

- config.go/shopware6.go: install shopware-cli from its official GitHub
  release (version-less "latest" asset) instead of COPY --from the DockerHub
  image, avoiding DockerHub pull limits and a pinned version literal
- shopware6.go: extract the release tarball with tar --no-same-owner (+ chmod
  0755) so the binary is owned by root:root like every other tool in
  /usr/local/bin, not the goreleaser build uid (1001:1001)
- versionconstants.go: drop the now-unused ShopwareCLIImage constant (it was
  neither a floating ref nor an image reference anymore)
- shopware.bats: assert a version-shaped string via --regexp rather than a
  hardcoded version literal
- shopware6_test.go: remove TestShopware6WebImageDockerfile; the bundled
  binary is validated in-container by the bats `ddev shopware-cli --version`
  check, which is the correct level rather than asserting on Dockerfile text
- quickstart.md: point the shopware-cli link at the GitHub project, not the
  DockerHub image page

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vanWittlaer added a commit to vanWittlaer/ddev that referenced this pull request Jul 24, 2026
… ports

Address review feedback on PR ddev#8597.

- Move shopware6_test.go into the internal `package ddevapp` so the tests
  call the real setShopware6SiteSettingsPaths / shopware6PostStartAction and
  reuse hasWebExposedPort, instead of reimplementing them as wrappers/helpers
  that can silently drift from production. Port assertions now use
  require.ElementsMatch against the expected WebExposedPort set. Switch to
  t.TempDir() to avoid the testcommon -> ddevapp import cycle.

- Move the watcher http_port fillers off the collision-prone 5172/8888/8889
  to 19172/19998/19999. These ports are never referenced at runtime (the
  watchers advertise HTTPS-only URLs); they exist solely to satisfy the
  http_port != https_port validation. container_port/https_port
  (5173/9998/9999) are unchanged pending a maintainer-preferred band.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@vanWittlaer
vanWittlaer force-pushed the bundle-shopware-cli-with-shopware6-project-type branch from dbf52e8 to 9b8d0e0 Compare July 24, 2026 19:54
@rfay

rfay commented Jul 25, 2026

Copy link
Copy Markdown
Member

I subscribed to shopware-cli releases so should see when it hits the release. I guess it just barely missed the latest one.

rfay pushed a commit to vanWittlaer/ddev that referenced this pull request Jul 25, 2026
…nd tests

Address PR review feedback (ddev#8597):

- config.go/shopware6.go: install shopware-cli from its official GitHub
  release (version-less "latest" asset) instead of COPY --from the DockerHub
  image, avoiding DockerHub pull limits and a pinned version literal
- shopware6.go: extract the release tarball with tar --no-same-owner (+ chmod
  0755) so the binary is owned by root:root like every other tool in
  /usr/local/bin, not the goreleaser build uid (1001:1001)
- versionconstants.go: drop the now-unused ShopwareCLIImage constant (it was
  neither a floating ref nor an image reference anymore)
- shopware.bats: assert a version-shaped string via --regexp rather than a
  hardcoded version literal
- shopware6_test.go: remove TestShopware6WebImageDockerfile; the bundled
  binary is validated in-container by the bats `ddev shopware-cli --version`
  check, which is the correct level rather than asserting on Dockerfile text
- quickstart.md: point the shopware-cli link at the GitHub project, not the
  DockerHub image page

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
rfay pushed a commit to vanWittlaer/ddev that referenced this pull request Jul 25, 2026
… ports

Address review feedback on PR ddev#8597.

- Move shopware6_test.go into the internal `package ddevapp` so the tests
  call the real setShopware6SiteSettingsPaths / shopware6PostStartAction and
  reuse hasWebExposedPort, instead of reimplementing them as wrappers/helpers
  that can silently drift from production. Port assertions now use
  require.ElementsMatch against the expected WebExposedPort set. Switch to
  t.TempDir() to avoid the testcommon -> ddevapp import cycle.

- Move the watcher http_port fillers off the collision-prone 5172/8888/8889
  to 19172/19998/19999. These ports are never referenced at runtime (the
  watchers advertise HTTPS-only URLs); they exist solely to satisfy the
  http_port != https_port validation. container_port/https_port
  (5173/9998/9999) are unchanged pending a maintainer-preferred band.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@rfay rfay added this to the v1.25.4 milestone Aug 17, 2026
vanWittlaer and others added 8 commits August 17, 2026 07:59
…ct type

Make the functionality of the ddev-shopware-cli add-on available to shopware6
projects without a separate install: bake the shopware-cli binary into the web
image, expose the watcher ports, and ship the watcher commands.

- config.go: bake the shopware-cli binary into the web image for shopware6
  projects via COPY --from=shopware/shopware-cli:bin
- shopware6.go: expose the watcher ports (5173/9998/9999) via
  configOverrideAction, idempotently and without clobbering user ports
- commands/web/{shopware-cli,admin-watch,storefront-watch}: bundled web
  commands gated to shopware6 via "## ProjectTypes". They call the binary by
  absolute path (no PATH recursion) and set the watcher env (PROXY_URL from the
  live DDEV_PRIMARY_URL) at runtime rather than via fragile web_environment
- shopware6_test.go: tests for the port override (idempotency, user-value
  preservation) and the Dockerfile binary injection

Targets Shopware 6.7.4.2+ (Vite admin on 5173).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…tart bats

Add watcher assertions to docs/tests/shopware.bats to guard the risky parts
of the bundled shopware-cli/admin-watch/storefront-watch commands:

- assert the baked-in shopware-cli binary works and matches the pinned
  version (ShopwareCLIImage, 0.16.7), covering the COPY --from image build
  and proving the wrapper does not recurse via $PATH
- assert admin-watch/storefront-watch resolve via `ddev help`, proving the
  ## ProjectTypes: shopware6 gate registers them for this project type
- assert `ddev admin-watch` with no args fails with its usage message

Deliberately does not launch the long-running watcher servers, and leaves
port-exposure coverage to TestShopware6ConfigOverrideAction.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nd tests

Address PR review feedback (ddev#8597):

- config.go/shopware6.go: install shopware-cli from its official GitHub
  release (version-less "latest" asset) instead of COPY --from the DockerHub
  image, avoiding DockerHub pull limits and a pinned version literal
- shopware6.go: extract the release tarball with tar --no-same-owner (+ chmod
  0755) so the binary is owned by root:root like every other tool in
  /usr/local/bin, not the goreleaser build uid (1001:1001)
- versionconstants.go: drop the now-unused ShopwareCLIImage constant (it was
  neither a floating ref nor an image reference anymore)
- shopware.bats: assert a version-shaped string via --regexp rather than a
  hardcoded version literal
- shopware6_test.go: remove TestShopware6WebImageDockerfile; the bundled
  binary is validated in-container by the bats `ddev shopware-cli --version`
  check, which is the correct level rather than asserting on Dockerfile text
- quickstart.md: point the shopware-cli link at the GitHub project, not the
  DockerHub image page

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… ports

Address review feedback on PR ddev#8597.

- Move shopware6_test.go into the internal `package ddevapp` so the tests
  call the real setShopware6SiteSettingsPaths / shopware6PostStartAction and
  reuse hasWebExposedPort, instead of reimplementing them as wrappers/helpers
  that can silently drift from production. Port assertions now use
  require.ElementsMatch against the expected WebExposedPort set. Switch to
  t.TempDir() to avoid the testcommon -> ddevapp import cycle.

- Move the watcher http_port fillers off the collision-prone 5172/8888/8889
  to 19172/19998/19999. These ports are never referenced at runtime (the
  watchers advertise HTTPS-only URLs); they exist solely to satisfy the
  http_port != https_port validation. container_port/https_port
  (5173/9998/9999) are unchanged pending a maintainer-preferred band.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The admin-watch command built its shop URL and --external-url from
https://${DDEV_HOSTNAME}, but DDEV_HOSTNAME becomes a comma-separated
list when additional_hostnames are configured, producing a broken URL.
Use DDEV_PRIMARY_URL_WITHOUT_PORT instead, which is the canonical single
project URL with the scheme included.

Apply the same variable to storefront-watch's PROXY_URL so appending
":9998" can never double a port (e.g. https://site.ddev.site:443:9998).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@rfay
rfay force-pushed the bundle-shopware-cli-with-shopware6-project-type branch from d10967c to 2dc8669 Compare August 17, 2026 14:31

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vanWittlaer - I went through this, made some minor adjustments to comments, rebased it. It seems like it's OK, but please check it over and go through the quickstart.

I see this warning about "old HMR mode", which seems like the usage might be incorrect now?
old-hmr-mode-shopware

@vanWittlaer

Copy link
Copy Markdown
Contributor Author

Thx @rfay thanks for your feedback. I just went through the quickstart and all green.

About the "Old HMR mode" warning: yes, when 6.8 is out we need to work on this. Best if we can find a way to support both modes in parallel (the new Vite one hopefull being even simpler). I have no clue how stable 6.8 is with regard to this, but it is on my shortlist to figure out).

@rfay

rfay commented Aug 18, 2026

Copy link
Copy Markdown
Member

@vanWittlaer it looked to me like this probably meant that the approach in this PR was now out of date? Thanks for taking a look.

@vanWittlaer

Copy link
Copy Markdown
Contributor Author

@rfay no our approach is correct for Shopware 6.7. And 6.8 is not out yet. My understanding of the warning message is that this "old HMR" i.e. webpack will be deprecated in 6.8, though still available - so a rather early warning. (Or call it Shopware-speeak if you like).

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for paying careful attention to this. We'll appreciate you keeping track of it. I find that warning pretty strange if it's a future-side warning.

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rfay
rfay merged commit 1da871b into ddev:main Aug 18, 2026
70 of 84 checks passed
@rfay

rfay commented Aug 18, 2026

Copy link
Copy Markdown
Member

Thanks so much for watching out for Shopware users on DDEV @vanWittlaer ! We'll look forward to your contributions going forward. @stasadev points out that 6.8 appears to be very near, https://github.com/shopware/shopware/blob/trunk/UPGRADE-6.8.md

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in the v1.25.4 release.

@lasomethingsomething

lasomethingsomething commented Sep 3, 2026 •

Copy link
Copy Markdown

Hey @vanWittlaer @rfay @stasadev, Product Manager from Shopware/DX Tools team here. Greatly appreciate this! As we head into Q4 would be very interested in getting your thoughts about our roadmap and how we might be able to improve the CLI, boost each others' signals, or collaborate. If that sounds interesting to you, just let me know here and I'll reach out to @vanWittlaer over Discord to set up a call (will make it EU/US timezone-friendly).

@rfay

rfay commented Sep 3, 2026

Copy link
Copy Markdown
Member

@lasomethingsomething likewise - We always want DDEV to serve our shopware friends better, so always interested in how it can grow that direction.

rfay added a commit that referenced this pull request Sep 16, 2026
…ed, fixes #8824

## Short Summary (TL;DR)

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

## The Issue

- Fixes #8824

## How This PR Solves The Issue

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

## Manual Testing Instructions

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

## Automated Testing Overview

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

## Release/Deployment Notes

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay added a commit that referenced this pull request Sep 22, 2026
…ed, fixes #8824

## Short Summary (TL;DR)

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

## The Issue

- Fixes #8824

## How This PR Solves The Issue

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

## Manual Testing Instructions

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

## Automated Testing Overview

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

## Release/Deployment Notes

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay added a commit that referenced this pull request Sep 22, 2026
…ed, fixes #8824

## Short Summary (TL;DR)

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

## The Issue

- Fixes #8824

## How This PR Solves The Issue

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

## Manual Testing Instructions

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

## Automated Testing Overview

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

## Release/Deployment Notes

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay added a commit that referenced this pull request Sep 23, 2026
…ed, fixes #8824

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

- Fixes #8824

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay added a commit that referenced this pull request Sep 23, 2026
…ed, fixes #8824

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

- Fixes #8824

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay added a commit that referenced this pull request Sep 23, 2026
…ed, fixes #8824

WP-CLI, Drush 8, the Backdrop Drush extension, magerun, magerun2, and Symfony CLI were baked into every web image regardless of project type. They're now installed only for the project types that use them, following the pattern the shopware-cli PR (#8597) already established.

- Fixes #8824

`pkg/ddevapp/project_tools.go` adds `projectToolsInstallDockerfile()`, which maps `app.Type` to the Dockerfile fragment(s) that install its tools: WP-CLI for `wordpress`/`wp-bedrock`, magerun for `magento`, magerun2 for `magento2`, Drush 8 for `drupal6`/`drupal7`/`backdrop`, the Backdrop Drush extension additionally for `backdrop`, and Symfony CLI for `symfony`. `config.go` calls this in place of the old shopware6-only special case, so `shopware6` now also picks up Symfony CLI in addition to `shopware-cli`, since Shopware 6 is itself built on the Symfony framework (`symfony/framework-bundle`, `bin/console`) and can use its console proxy and requirement checks. The corresponding installs are removed from `containers/ddev-webserver/Dockerfile`.

Modern Drupal (8+) and other project types that merely consume individual Symfony components internally (TYPO3, Laravel, Silverstripe, Magento 2) are left out: none of them expose a `bin/console` or use `symfony/framework-bundle`, so Symfony CLI wouldn't have anything to attach to.

- `ddev config --project-type=wordpress && ddev start`, then `ddev exec which wp wp-cli` should succeed; on a `php` project type it should fail.
- Same check for `magerun`/`magento`, `magerun2`/`magento2`, `drush8`/`drupal7`, `symfony`/`symfony` binary, and `shopware-cli` + `symfony` binary/`shopware6`.
- `docker exec <ddev-webserver container> command -v wp wp-cli magerun magerun2 drush8 symfony shopware-cli` should all fail against the shared image directly (covered by the new bats test).

- `go test ./pkg/ddevapp/ -run TestProjectToolsDockerfile` covers every project type's generated `.webimageBuild/Dockerfile`.
- `containers/ddev-webserver/tests/ddev-webserver/general.bats` gained a test asserting none of these tools exist in the shared image.

Projects that relied on Drush 8, WP-CLI, magerun, magerun2, or Symfony CLI being present without setting a matching `--project-type` need to either set the correct type or add the tool via a custom `web-build/Dockerfile`, documented in the new "Project-Specific Utilities" section of `customizing-images.md`.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants