Skip to content

Add Symfony ^8.0 support alongside ^7.0 (PHP >= 8.2) - #3

Open
Azmandios wants to merge 9 commits into
Ne-Lexa:mainfrom
Azmandios:roach-3
Open

Azmandios wants to merge 9 commits into
Ne-Lexa:mainfrom
Azmandios:roach-3

Conversation

@Azmandios

@Azmandios Azmandios commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Originally this branch adapted the bundle to roach-php/core 3.2 + Symfony ^7.0 (registering HttpErrorMiddleware / ProxyMiddleware). It now also adds forward support for Symfony 8.x without any code changes:

  • symfony/*: ^7.0 → ^7.0|^8.0 (require + require-dev).
  • No bundle source changes are required (see Compatibility).
  • Fix ItemNormalizer::getSupportedTypes(): it returned a list ([ItemInterface::class]) instead of a keyed map ([ItemInterface::class => true]), so the Symfony serializer never associated the normalizer with ItemInterface and roach:run --output failed with NotNormalizableValueException.
  • Migrate the bundle test suite to PHPUnit 11 (static data provider; #[Small] / #[Medium] / #[DataProvider] attributes; SymfonyExtension instead of the removed SymfonyTestsListener).
  • CI: matrix php 8.2–8.5 × SYMFONY_REQUIRE 7.4.*/8.0.*/8.1.* × prefer-lowest/prefer-stable; drop the obsolete psalm step.

Compatibility

No code changes are needed for Symfony 8: all Symfony classes imported by roach-php/core + this bundle exist in Symfony 8.1, and static analysis reports no undefined/not found errors. The bundle stays a thin wrapper (boot() → Roach::useContainer()).

Testing

  • Bundle suite: 12 tests / 38 assertions green on Symfony 7.4 and on Symfony 8.1.
  • CI matrix exercises both dependency bounds (prefer-lowest / prefer-stable).

Notes for maintainers

The bundle alone cannot be installed on Symfony 8.x yet: roach-php/core 3.2.1 requires symfony/* ^7.0 (console, css-selector, dom-crawler, event-dispatcher, options-resolver) and php ~8.2.0||~8.3.0||~8.4.0. Since this is a transitive constraint it cannot be patched after install — a matching constraint widening in roach-php/core is required first. For that reason the 8.0.* / 8.1.* CI cells are marked as allowed failures until core is updated upstream.

@Azmandios Azmandios changed the title Adapt to roach-php/core 3.2 + Symfony ^7.0 (PHP >= 8.2) Add Symfony ^8.0 support alongside ^7.0 (PHP >= 8.2) Oct 16, 2026
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