Skip to content

docs: update XML service and route definition examples to PHP format - #2401

Open
Umut Dogan (umutdogan4291) wants to merge 5 commits into
mainfrom
chore/use-php-configs-in-docs
Open

docs: update XML service and route definition examples to PHP format#2401
Umut Dogan (umutdogan4291) wants to merge 5 commits into
mainfrom
chore/use-php-configs-in-docs

Conversation

@umutdogan4291

@umutdogan4291 Umut Dogan (umutdogan4291) commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

XML DI configuration is deprecated since Symfony 7.4 and core/extension configs were migrated to PHP.
Updates all remaining service and route definition examples (MCP server, caching, Migration Assistant, Subscriptions) to the ContainerConfigurator/RoutingConfigurator style.
ADRs and non-Symfony XML configs are intentionally unchanged.

Related links

shopware/shopware#13072

Checklist

  • I reviewed affected links, code samples, and cross-references, including PageRef references where relevant.
  • I added or updated redirects in .gitbook.yaml if pages were moved, renamed, or deleted.
  • I updated .wordlist.txt (and sorted it) if spellcheck flags new legitimate terms.
  • Any required dependent changes in downstream modules have already been merged and published.
  • This pull request is ready for review.

Notes

@shopware-dev-docs-connector

shopware-dev-docs-connector Bot commented Jul 27, 2026

Copy link
Copy Markdown

Developer Docs healthcheck

Status: Completed with success.
Repository: shopware/docs
Commit: 300361e
Preview: https://developer-documentation-cpojdit9q-shopware-frontends.vercel.app
Workflow run: #4604

@umutdogan4291
Umut Dogan (umutdogan4291) marked this pull request as draft July 27, 2026 12:37
@umutdogan4291
Umut Dogan (umutdogan4291) marked this pull request as ready for review July 28, 2026 06:56
@umutdogan4291
Umut Dogan (umutdogan4291) requested a review from a team July 28, 2026 06:56
After adding the definition to the line item, we have to calculate the current price of the discount. Therefore we can use the `PercentagePriceCalculator` of the core. The last step is to add the discount to the new cart which is provided as `Cart $toCalculate`.

That's it for the main code of our custom `CartProcessor`. Now we only have to register it in our `services.php` using the tag `shopware.cart.processor` and priority `4500`, which is used to get access to the calculation after the [product processor](https://github.com/shopware/shopware/blob/v6.3.4.1/src/Core/Checkout/DependencyInjection/cart.xml#L223-L231) handled the products.
That's it for the main code of our custom `CartProcessor`. Now we only have to register it in our `services.php` using the tag `shopware.cart.processor` and priority `4500`, which is used to get access to the calculation after the [product processor](https://github.com/shopware/shopware/blob/28ee9f4f98f2a626c7a53bf2c341443c54756d5c/src/Core/Checkout/DependencyInjection/cart.php#L505-L516) handled the products.

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.

should we add a concrete version instead? 🤔

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 hesitated to add because it's not in any version yet 🤔 merged in 18472
Can we assume it will be released and use it's milestone

https://github.com/shopware/shopware/blob/v6.7.14.0/src/Core/Checkout/DependencyInjection/cart.php#L505-L516

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.

at least your commit is not on the 6.7.13.x branch 😁

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