Skip to content

Replace deprecated XML configuration with PHP and YAML#327

Open
HecFranco wants to merge 5 commits intoliip:2.xfrom
HecFranco:feature/replace-deprecated-xml
Open

Replace deprecated XML configuration with PHP and YAML#327
HecFranco wants to merge 5 commits intoliip:2.xfrom
HecFranco:feature/replace-deprecated-xml

Conversation

@HecFranco
Copy link

Summary

This PR migrates the bundle's service and routing configuration from XML to PHP/YAML format, addressing deprecations introduced in Symfony 7.4. XML configuration is deprecated and will be removed in Symfony 8.0; this change ensures compatibility with upcoming Symfony versions.

Changes

Configuration migration

  • Service definitions: All 33 check configurations and core services (runner, helper, commands, controller, symfony_mailer) have been migrated from .xml to .php format
  • Routing: Migrated from routing.xml to routing.yaml
  • Extension: LiipMonitorExtension and MailerCompilerPass updated to use PhpFileLoader instead of XmlFileLoader

Documentation

  • UPGRADE.md: Added migration notes for the routing file extension change
  • README.md: Updated routing reference from routing.xml to routing.yaml

Developer experience

  • Docker: Added Dockerfile and docker-compose.yml for running tests in a containerized environment
  • Composer: Added composer test script to run the test suite

Breaking change

If your application imports the bundle routes manually, update the resource path:

# Before
_monitor:
    resource: "@LiipMonitorBundle/Resources/config/routing.xml"

# After
_monitor:
    resource: "@LiipMonitorBundle/Resources/config/routing.yaml"

Applications using the default bundle route import (typically via config/routes.yaml) are unaffected.

Testing

  • All tests pass locally
  • CI matrix unchanged (PHP 8.1–8.4, Symfony 6.4.x, 7.2.x, 7.3.x)
  • PHP-CS-Fixer compliant

…bility)

- Migrate all service definitions from XML to PHP format
- Migrate routing from XML to YAML
- Update LiipMonitorExtension and MailerCompilerPass to use PhpFileLoader
- Update README with new routing.yaml reference

XML configuration is deprecated in Symfony 7.4 and will be removed in Symfony 8.0.
This change ensures bundle compatibility with upcoming Symfony versions.
@HecFranco
Copy link
Author

Hi maintainers and contributors,
I’ve opened this PR to address [briefly describe the change, e.g. “replacing deprecated XML configuration”]. I’d be grateful if you could take a look when you have time.
The changes [e.g. “replace deprecated XML with PHP/YAML configuration”] and I’ve tried to keep the patch minimal and backward-compatible. I’m happy to adjust anything to match the project’s style or requirements.
Please review when convenient and, if it looks good, consider approving and merging. I’m also available to answer questions or make follow-up changes.
Thanks for maintaining this project.

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.

1 participant