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.
- Downgrade laminas/laminas-diagnostics to version 1.27 in composer.json - Expand version constraints for doctrine packages in require-dev - Add PHP 8.5 and Symfony 6.4 support in CI workflow, noting compatibility issues with laminas-diagnostics 1.28+
- Update CI configuration to handle Symfony 8.0 compatibility by removing incompatible dev dependency. - Adjust dependency installation process based on Symfony version. - Skip tests related to security advisory if the optional dependency is not installed. - Mark tests as incompatible with Symfony 8 where necessary.
- Add validation step in CI to ensure composer.json constraints are met for PHP 8.1 and Symfony 6.4 compatibility. - Enforce specific version requirements for laminas/laminas-diagnostics and restrict usage of enlightn/security-checker in require-dev.
- Introduce phpunit-symfony8.xml.dist for Symfony 8 CI jobs. - Update CI workflow to use the new PHPUnit configuration file. - Mark tests as incompatible with Symfony 8 where necessary to ensure proper test execution.
- Introduce config_symfony8.yml to define framework and liip_monitor settings for Symfony 8 compatibility. - Ensure the structure aligns with Symfony 7.x for consistency in testing.
- Include symfony/yaml in composer.json to support YAML parsing in Symfony 8. - Ensure compatibility with existing Symfony dependencies.
|
Would be great if you can support SF8 @kbond |
|
Hi! Thanks again for maintaining this bundle. I just wanted to kindly follow up on Symfony 8 support. There is already visible community interest for PHP 8.5 / Symfony 8 compatibility (#322), and this PR aims to provide that while keeping existing supported versions unchanged. If the current PR is difficult to review because it depends on #327, I’d be happy to split it differently or open a smaller follow-up PR to make merging easier. In any case, if there are blockers or changes you would like to see, I’d really appreciate a quick note and I can adjust the PR accordingly. Thanks again for your time. |
| run: | | ||
| RAW=$(cat composer.json | tr -d '\n') | ||
| if echo "$RAW" | grep -qE 'laminas-diagnostics[^"]*"\^1\.28"'; then | ||
| echo "::error::composer.json must use laminas/laminas-diagnostics ^1.27 (not ^1.28) for PHP 8.1 and Symfony 6.4 compatibility." |
There was a problem hiding this comment.
this would be discovered by the build of php 8.1 with symfony 6.4, no need to have this here.
| exit 1 | ||
| fi | ||
| if echo "$RAW" | grep -q '"require-dev"[^}]*"enlightn/security-checker"'; then | ||
| echo "::error::enlightn/security-checker must be in suggest only, not in require-dev. Remove it from require-dev." |
There was a problem hiding this comment.
i'd rather not have this check here either. review should catch this.
| php -r " | ||
| \$j = json_decode(file_get_contents('composer.json'), true); | ||
| unset(\$j['require-dev']['matthiasnoback/symfony-dependency-injection-test']); | ||
| file_put_contents('composer.json', json_encode(\$j, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
There was a problem hiding this comment.
meanwhile supports symfony 8. the proper way to remove a package would be through composer, not hacking around on the composer.json file.
| SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
|
||
| - name: Install dependencies (Symfony 8) | ||
| if: matrix.symfony == '8.0.*' |
There was a problem hiding this comment.
removing this and use the simplified step for everything
| @@ -1,33 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
There was a problem hiding this comment.
to avoid a BC break, we still need to provide the file. i will just add it back, and keep routing.php include the yaml file instead of the xml file to work with symfony 8
|
fixed in #239 |
Summary
Adds support for PHP 8.5 and Symfony 8.x so the bundle can be used on the latest runtimes. Upgrades are independent: projects can adopt either, both, or stay on current versions.
Changes
PHP 8.5
laminas/laminas-diagnosticsfrom^1.9to^1.28so Composer can resolve a version that supports PHP 8.5 (1.27.x only supports up to 8.4).Symfony 8
^8.0for:symfony/framework-bundleasset,browser-kit,expression-language,finder,mailer,messenger,phpunit-bridge,twig-bundle8.0.*to the CI matrix.CI
dependency-versionsto usematrix.depsinstead ofinputs.deps.composer.jsonformatting (indent, key order).Testing
composer.jsonremains valid; existing PHP 8.1–8.4 and Symfony 6.4/7.x combinations unchanged.Notes
feature/replace-deprecated-xml. Merge that branch first, then change this PR's base tomainand merge.