Skip to content

[XML2PHP] LocaleBundle#18764

Merged
TheMilek merged 1 commit intoSylius:2.3from
crydotsnake:xml2php/locale
Feb 4, 2026
Merged

[XML2PHP] LocaleBundle#18764
TheMilek merged 1 commit intoSylius:2.3from
crydotsnake:xml2php/locale

Conversation

@crydotsnake
Copy link
Copy Markdown
Member

@crydotsnake crydotsnake commented Jan 31, 2026

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

Summary by CodeRabbit

  • Chores
    • Migrated LocaleBundle service configuration format, maintaining all existing functionality and service definitions.

✏️ Tip: You can customize this high-level summary in your review settings.

@crydotsnake crydotsnake requested review from a team as code owners January 31, 2026 10:39
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@crydotsnake has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

The LocaleBundle's Symfony DI service configuration is migrated from XML to PHP format. The extension's loader is switched from XmlFileLoader to PhpFileLoader, the XML services configuration file is removed, and an equivalent PHP configuration file is introduced with identical service registrations.

Changes

Cohort / File(s) Summary
Configuration Format Migration
src/Sylius/Bundle/LocaleBundle/DependencyInjection/SyliusLocaleExtension.php
Replaced XmlFileLoader with PhpFileLoader and updated resource path from services.xml to services.php.
Service Configuration
src/Sylius/Bundle/LocaleBundle/Resources/config/services.php, src/Sylius/Bundle/LocaleBundle/Resources/config/services.xml
Introduced comprehensive PHP-based service configuration defining all locale-related services, aliases, decorators, and listeners; corresponding XML configuration removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • Rafikooo
  • mamazu
  • NoResponseMate

Poem

🐰 XML served us long and true,
But PHP makes config new!
Services fluent, clean, and bright—
Our LocaleBundle takes flight! ✨

🚥 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] LocaleBundle' clearly describes the main change: converting XML service configuration to PHP format in the LocaleBundle. It directly reflects the core objective evident in the changeset (removing services.xml and adding services.php).

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

✨ Finishing touches
🧪 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 31, 2026

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

Comment on lines +82 to +92
$services->set('sylius.provider.locale', LocaleProvider::class)
->args([
service('sylius.provider.locale_collection'),
'%sylius_locale.locale%',
]);

$services->alias(LocaleProviderInterface::class, 'sylius.provider.locale');

$services->set('sylius.converter.locale', LocaleConverter::class);

$services->alias(LocaleConverterInterface::class, 'sylius.converter.locale');
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.

Suggested change
$services->set('sylius.provider.locale', LocaleProvider::class)
->args([
service('sylius.provider.locale_collection'),
'%sylius_locale.locale%',
]);
$services->alias(LocaleProviderInterface::class, 'sylius.provider.locale');
$services->set('sylius.converter.locale', LocaleConverter::class);
$services->alias(LocaleConverterInterface::class, 'sylius.converter.locale');
$services->set('sylius.provider.locale', LocaleProvider::class)
->args([
service('sylius.provider.locale_collection'),
'%sylius_locale.locale%',
]);
$services->alias(LocaleProviderInterface::class, 'sylius.provider.locale');
$services->set('sylius.converter.locale', LocaleConverter::class);
$services->alias(LocaleConverterInterface::class, 'sylius.converter.locale');

Maybe it's just me, but I think it just looks better 😄

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