Skip to content

[XML2PHP] Addressing#18491

Merged
TheMilek merged 2 commits intoSylius:2.3from
loic425:xml2php/addressing
Feb 6, 2026
Merged

[XML2PHP] Addressing#18491
TheMilek merged 2 commits intoSylius:2.3from
loic425:xml2php/addressing

Conversation

@loic425
Copy link
Copy Markdown
Member

@loic425 loic425 commented Oct 31, 2025

Q A
Branch?
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets partially #18490
License MIT

Summary by CodeRabbit

  • Refactor
    • Addressing bundle configuration migrated from XML to PHP. Service registrations, form types, validation rules and event listeners have been preserved and re-registered via the new configuration to maintain existing behavior and compatibility.

@loic425 loic425 requested review from a team as code owners October 31, 2025 13:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 31, 2025

📝 Walkthrough

Walkthrough

Migrates AddressingBundle service configuration from XML to PHP: replaces XmlFileLoader with PhpFileLoader in the Extension and converts multiple Resources/config/*.xml service files into equivalent *.php files (services, checkers, form, listeners), deleting the original XML files.

Changes

Cohort / File(s) Summary
Extension Loader
src/Sylius/Bundle/AddressingBundle/DependencyInjection/SyliusAddressingExtension.php
Swapped XmlFileLoader for PhpFileLoader; changed loaded resource from services.xml to services.php.
Main Services
src/Sylius/Bundle/AddressingBundle/Resources/config/services.php, src/Sylius/Bundle/AddressingBundle/Resources/config/services.xml
Added services.php with full DI wiring (factories, providers, matcher, converters, comparator, Twig extensions, validators, aliases); removed the former services.xml.
Checker Services
src/Sylius/Bundle/AddressingBundle/Resources/config/services/checkers.php, .../services/checkers.xml
Added checkers.php defining sylius.checker.zone_deletion and sylius.checker.country_provinces_deletion plus interface aliases; removed XML counterpart.
Form Services
src/Sylius/Bundle/AddressingBundle/Resources/config/services/form.php, .../services/form.xml
Added form.php registering form type services, build subscriber, and validation group parameters (11 form services); removed form.xml.
Listener Services
src/Sylius/Bundle/AddressingBundle/Resources/config/services/listeners.php, .../services/listeners.xml
Added listeners.php registering sylius.listener.zone_member_integrity with two kernel.event_listener tags; removed XML listener file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped from XML burrows, tidy and neat,
Into PHP meadows with services to meet.
Aliases, tags, and listeners in line,
I nibbled the XML and found PHP fine.
A little hop for Addressing — code looks divine!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[XML2PHP] Addressing' directly describes the main change: converting XML service configuration files to PHP format for the Addressing bundle.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@loic425 loic425 added the Maintenance CI configurations, READMEs, releases, etc. label Oct 31, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 31, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

@loic425 loic425 force-pushed the xml2php/addressing branch 2 times, most recently from 06ff808 to fb6f89a Compare October 31, 2025 13:36
@Rafikooo Rafikooo changed the base branch from 2.2 to 2.3 February 5, 2026 14:48
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/Sylius/Bundle/AddressingBundle/Resources/config/services/form.php`:
- Around line 29-105: The services in this PHP service config were left private
because the XML default public="true" was not migrated; after the $services =
$container->services() call add a defaults() call to make them public (call
$services->defaults()->public()) so all form services like
'sylius.form.type.address', 'sylius.form.type.country', 'sylius.form.type.zone',
'sylius.form.type.zone_member' etc. keep public visibility as in the original
form.xml.

@TheMilek TheMilek merged commit ae14caa into Sylius:2.3 Feb 6, 2026
36 checks passed
@loic425 loic425 deleted the xml2php/addressing branch February 25, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintenance CI configurations, READMEs, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants