Add Symfony 8, PHP 8.5 support and migrate from deprecated XML config to PHP/YAML#326
Closed
Add Symfony 8, PHP 8.5 support and migrate from deprecated XML config to PHP/YAML#326
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
runner,helper,commands,controller,symfony_mailerResources/config/checks/routing.xmltorouting.yamlLiipMonitorExtensionandMailerCompilerPassto usePhpFileLoaderinstead ofXmlFileLoaderrouting.xmltorouting.yamlXML configuration is deprecated in Symfony 7.4 and will be removed in Symfony 8.0.
2. Add PHP 8.5 and Symfony 8 support
symfony/framework-bundle:^6.4|^7.0|^8.0^8.0doctrine/doctrine-migrations-bundle:^2.0 || ^3.0 || ^4.0(v4 for Symfony 8)symfony/phpunit-bridge:^7.3|^8.0config_symfony8.ymlfor Symfony 8 tests3. Add Docker setup for contributors
docker compose run --rm php sh→ thencomposer install && composer test4. Documentation
scripts.testforcomposer testBackward compatibility
routing.xmlmust update torouting.yaml(see UPGRADE.md)Testing
All 97 tests pass. Verified with:
Related