Skip to content

feat: wire sync rewrite to fyrst:sales-channel:rewrite-urls - #30

Merged
ROBJkE merged 1 commit into
mainfrom
cursor/sync-rewrite-console-a170
Sep 13, 2026
Merged

ROBJkE merged 1 commit into
mainfrom
cursor/sync-rewrite-console-a170

Conversation

@ROBJkE

@ROBJkE ROBJkE commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Wire VPS sync post-restore sales-channel URL rewrite to bin/console fyrst:sales-channel:rewrite-urls from fyrst-dev/shopware-cd#20. Overlay bash no longer runs UPDATE sales_channel_domain.

Follows #17. Do not edit shopware-cd PHP in this PR.

Recipe

  • manifest.json: Flex bundles entry for Fyrst\ShopwareCd\FyrstShopwareCdBundle (all). Existing copy-from-recipe + env block unchanged. composer recipes:update fyrst/shopware-cd writes config/bundles.php.
  • deploy/sync-runtime.sh: maybe_rewrite_sales_channel_domains calls the console command via compose run --rm --pull never --entrypoint php (same style as cache:clear). --dry-run is passed only when DRY_RUN=1.
  • Bash keeps early live refuse (including SYNC_ALLOW_LIVE_RESTORE=1 does not bypass), “rewrite requested?”, and “db skipped” guards.
  • deploy/lib/sync-rewrite.sh is slimmed to those guards plus CLI flag construction. SQL planner/update helpers are gone.

Operator how-to

Set SYNC_REWRITE_APP_URL and/or SYNC_REWRITE_URL_MAP on a non-live consumer. Sync calls the console command. Shops need:

composer update fyrst/shopware-cd
composer recipes:update fyrst/shopware-cd

so the command and bundle exist.

Tests

bash fyrst/shopware-cd/1.0/tests/sync-rewrite.test.sh and vps-hardening.test.sh / init-env.test.sh pass.

Flex rebuild

The Flex index (flex/main) rebuilds on merge to main via Update Flex endpoint. Until that workflow succeeds, shops will not see the new bundles entry from this endpoint.

The same overlay change is mirrored onto fyrst-dev/recipes-contrib branch add-fyrst-shopware-cd (symfony/recipes-contrib#2049).

Open in Web Open in Cursor 

Call bin/console fyrst:sales-channel:rewrite-urls after a non-live DB
restore instead of bash SQL. Keep requested? / live-refuse / db-skipped
guards in overlay bash. Register FyrstShopwareCdBundle in the Flex
manifest so composer recipes:update writes config/bundles.php.

Companion to fyrst-dev/shopware-cd#20. Follows #17.

Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
@ROBJkE
ROBJkE marked this pull request as ready for review September 13, 2026 06:21
@ROBJkE
ROBJkE merged commit 31efef0 into main Sep 13, 2026
@ROBJkE
ROBJkE deleted the cursor/sync-rewrite-console-a170 branch September 13, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants