Skip to content

Add PHP 8.5 and Symfony 8 support#328

Open
HecFranco wants to merge 13 commits intoliip:2.xfrom
HecFranco:feature/php85-symfony8
Open

Add PHP 8.5 and Symfony 8 support#328
HecFranco wants to merge 13 commits intoliip:2.xfrom
HecFranco:feature/php85-symfony8

Conversation

@HecFranco
Copy link

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

  • Bump laminas/laminas-diagnostics from ^1.9 to ^1.28 so Composer can resolve a version that supports PHP 8.5 (1.27.x only supports up to 8.4).
  • Add PHP 8.5 to the CI matrix.

Symfony 8

  • Extend Symfony constraints to ^8.0 for:
    • symfony/framework-bundle
    • Dev components: asset, browser-kit, expression-language, finder, mailer, messenger, phpunit-bridge, twig-bundle
  • Add Symfony 8.0.* to the CI matrix.
  • Restrict Symfony 8 jobs to PHP 8.4+ (Symfony 8 requirement); excluded for PHP 8.1, 8.2, 8.3.

CI

  • Fix dependency-versions to use matrix.deps instead of inputs.deps.
  • Normalise composer.json formatting (indent, key order).

Testing

  • composer.json remains valid; existing PHP 8.1–8.4 and Symfony 6.4/7.x combinations unchanged.
  • CI runs with PHP 8.1–8.5 and Symfony 6.4, 7.2, 7.3, 8.0 as applicable.

Notes

  • Stacked PR: This PR is based on feature/replace-deprecated-xml. Merge that branch first, then change this PR's base to main and merge.

…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

Ready for review. This PR adds PHP 8.5 and Symfony 8 support with minimal, backward-compatible changes (constraints + CI).

Merge order: Please merge #327 first (it’s the base branch for this PR). Once #327 is in, I’ll retarget this PR to main and it can be merged right after. Thanks.

- 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.
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