Skip to content

Symfony 8 compatibility: convert XML DI config to PHP - #57

Open
PierreGauthier wants to merge 1 commit into
2.3.xfrom
fix-gh55-symfony8-xml-config
Open

Symfony 8 compatibility: convert XML DI config to PHP#57
PierreGauthier wants to merge 1 commit into
2.3.xfrom
fix-gh55-symfony8-xml-config

Conversation

@PierreGauthier

Copy link
Copy Markdown
Contributor

Summary

Fixes #55. Symfony's DependencyInjection XML config format is deprecated since 7.4 ("Deprecate XML configuration format, use YAML or PHP instead") and no longer supported in 8.0, so the connector could not boot on Symfony 8.

  • Converts the 8 XML service files (services.xml + 7 imported files) to PHP (ContainerConfigurator), one-to-one: same services, arguments, tags, parent/abstract, decorates, tagged iterators, factory service, parameters. GallySyliusExtension::load() now uses PhpFileLoader instead of XmlFileLoader.
  • The Doctrine ORM XML mapping file (GallyConfiguration.orm.xml) is untouched, unrelated format, not affected by this deprecation.
  • Bumps the stale extra.symfony.require (^5.4 || ^6.0^6.4 || ^7.4 || ^8.0) and the dev dependencies pinned below ^8.0 (symfony/browser-kit, debug-bundle, dotenv, intl, web-profiler-bundle), as flagged in the issue.

Test plan

  • vendor/bin/phpstan analyse clean
  • php -l on every converted file
  • Verified against the real running Docker app (not the plugin's isolated tests/Application, which isn't provisioned in this environment): bin/console cache:clear compiles the container without error
  • debug:container spot checks confirm exact parity with the previous XML for the trickiest constructs: ProductIndexer (parent/abstract argument inheritance), Grid\DataProvider (decorates), Command\StructureSync (tagged_iterator with index-by)

Symfony's DependencyInjection XML config format is deprecated since 7.4
and no longer supported in 8.0. Converts the plugin's 8 XML service files
to PHP (ContainerConfigurator) one-to-one, and swaps XmlFileLoader for
PhpFileLoader in GallySyliusExtension. Also bumps composer.json's stale
extra.symfony.require and dev-dependency constraints to allow ^8.0.

The Doctrine ORM XML mapping file is untouched, unrelated format.

Fixes #55
@PierreGauthier
PierreGauthier force-pushed the fix-gh55-symfony8-xml-config branch from 6776619 to 71e4850 Compare August 12, 2026 12:55
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.

Symfony 8 compatibility: the XML service configuration format is no longer supported

2 participants