Skip to content

Add Symfony 8, PHP 8.5 support and migrate from deprecated XML config to PHP/YAML#326

Closed
HecFranco wants to merge 4 commits intoliip:2.xfrom
HecFranco:feature/symfony-8-php-85-xml-deprecation
Closed

Add Symfony 8, PHP 8.5 support and migrate from deprecated XML config to PHP/YAML#326
HecFranco wants to merge 4 commits intoliip:2.xfrom
HecFranco:feature/symfony-8-php-85-xml-deprecation

Conversation

@HecFranco
Copy link

Summary

This PR prepares LiipMonitorBundle for Symfony 8 and PHP 8.5 while maintaining full backward compatibility with Symfony 6.4 and 7.x. It also addresses the XML configuration deprecation introduced in Symfony 7.4.

Changes

1. Replace deprecated XML configuration (Symfony 7.4+ compatibility)

  • Service definitions: Migrated all service configuration from XML to PHP format
    • Core services: runner, helper, commands, controller, symfony_mailer
    • All 33 check definitions in Resources/config/checks/
  • Routing: Migrated from routing.xml to routing.yaml
  • Loaders: Updated LiipMonitorExtension and MailerCompilerPass to use PhpFileLoader instead of XmlFileLoader
  • README: Updated routing reference from routing.xml to routing.yaml

XML configuration is deprecated in Symfony 7.4 and will be removed in Symfony 8.0.

2. Add PHP 8.5 and Symfony 8 support

  • composer.json:
    • symfony/framework-bundle: ^6.4|^7.0|^8.0
    • All Symfony component dev dependencies: added ^8.0
    • doctrine/doctrine-migrations-bundle: ^2.0 || ^3.0 || ^4.0 (v4 for Symfony 8)
    • symfony/phpunit-bridge: ^7.3|^8.0
  • CI: Added PHP 8.5 and Symfony 8.0.* to the test matrix
  • CI exclusions: Symfony 8 requires PHP 8.4+, so PHP 8.1/8.2/8.3 are excluded when testing Symfony 8
  • Test fixture: Added config_symfony8.yml for Symfony 8 tests

3. Add Docker setup for contributors

  • Dockerfile: PHP 8.3 CLI with Composer and extensions
  • docker-compose.yml: Service to run tests in a container
  • Usage: docker compose run --rm php sh → then composer install && composer test

4. Documentation

  • UPGRADE.md: Added notes for the routing file change (BC break for users who import routes manually)
  • composer.json: Added scripts.test for composer test

Backward compatibility

  • ✅ Symfony 6.4 and 7.x remain fully supported
  • ✅ PHP 8.1–8.5 supported
  • ⚠️ BC break: Users who import bundle routes with routing.xml must update to routing.yaml (see UPGRADE.md)

Testing

All 97 tests pass. Verified with:

docker compose run --rm php sh
# Inside container:
composer install
composer test

Related

…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.
- Add Symfony 8.0 to composer.json constraints (framework-bundle and all symfony/* deps)
- Add doctrine/doctrine-migrations-bundle ^4.0 for Symfony 8 compatibility
- Add PHP 8.5 and Symfony 8.0.* to CI matrix
- Exclude Symfony 8 with PHP < 8.4 (Symfony 8 requires PHP 8.4+)
- Add config_symfony8.yml test fixture

Backward compatibility with Symfony 6.4 and 7.x is preserved.
- Add Dockerfile with PHP 8.3 CLI and Composer
- Add docker-compose.yml for easy test execution
- Run tests with: docker compose run --rm php sh (then: composer install && composer test)
@HecFranco HecFranco closed this Feb 5, 2026
@HecFranco HecFranco deleted the feature/symfony-8-php-85-xml-deprecation branch February 5, 2026 20:56
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