Skip to content

chore(deps): support symfony 7 - #3

Merged
Teddy Sommavilla (wazazaby) merged 1 commit into
mainfrom
chore/support-symfony-7
Sep 21, 2026
Merged

Teddy Sommavilla (wazazaby) merged 1 commit into
mainfrom
chore/support-symfony-7

Conversation

@wazazaby

@wazazaby Teddy Sommavilla (wazazaby) commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Élargit les contraintes Symfony à ^6.4 || ^7.0 et monte le plancher PHP à 8.2, ce qu'exige Symfony 7. Le code du bundle était déjà compatible : l'extension étend le Extension de DependencyInjection (pas celui de HttpKernel qui a bougé), le listener utilise ResponseEvent / isMainRequest(), et les services passent par ContainerConfigurator.

Trois choses à corriger pour avoir une CI verte, toutes dues aux dev dependencies non pinnées que composer update résout au dernier :

  • phpcs est cassé sur main depuis que slevomat 8.x a renommé les propriétés de DeclareStrictTypes en linesCount*
  • le @phpstan-ignore-next-line global dans Configuration n'est pas matché en Symfony 7, où getRootNode() est documenté comme renvoyant un ArrayNodeDefinition. Remplacé par un assert explicite
  • la matrice de tests tourne maintenant sur 8.2 / 8.3 / 8.4, mais ne croise --prefer-lowest qu'avec 8.2 : le Symfony le plus bas autorisé tire un symfony/cache qui n'est pas PHP 8.4 clean, et aucun consommateur ne tombera jamais sur cette combinaison

À taguer 2.1.0 (les tags existants n'ont pas de préfixe v, contrairement aux liens du CHANGELOG qui pointaient vers v1.1.1). Packagist le récupère via le webhook. Le CHANGELOG récupère au passage l'entrée 2.0.0 qui manquait.

🤖 Generated with Claude Code

Closes #1

Widens the Symfony constraints to `^6.4 || ^7.0` and raises the PHP floor to
8.2, which is what Symfony 7 needs. The bundle code was already compatible:
the extension extends the DependencyInjection `Extension` (not the moved
HttpKernel one), the listener uses `ResponseEvent`/`isMainRequest()`, and
services are declared through `ContainerConfigurator`.

Three things had to be fixed to get CI green, all caused by the unpinned dev
dependencies that `composer update` resolves to their latest:

- phpcs has been failing on main since slevomat 8.x renamed the
  `DeclareStrictTypes` properties to `linesCount*`.
- the blanket `@phpstan-ignore-next-line` in `Configuration` is unmatched on
  Symfony 7, where `getRootNode()` is documented as returning an
  `ArrayNodeDefinition`. Replaced with an explicit assert.
- the test matrix now runs 8.2/8.3/8.4, but only pairs `--prefer-lowest` with
  8.2: the lowest allowed Symfony brings in a symfony/cache that is not PHP 8.4
  clean, and no consumer will ever hit that combination.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wazazaby
Teddy Sommavilla (wazazaby) marked this pull request as ready for review September 21, 2026 15:35
@wazazaby

Copy link
Copy Markdown
Member Author

Supersedes #2 and answers #1: yes, Symfony 7 support was planned, sorry it took a while.

This does the same constraint widening as Raphaël Droz (@drzraf)'s patch, with a few differences: the floor moves to ^6.4 and PHP ^8.2 rather than keeping ^6.0 (Symfony 7 needs PHP 8.2, and 6.0 to 6.3 are all end of life), and PHPUnit stays at ^9.2 since the test suite has not been ported to 10 yet. It also fixes the phpcs and phpstan failures that were making CI red on main regardless, and extends the test matrix to 8.2 / 8.3 / 8.4.

Thanks for the nudge and the patch.

@wazazaby
Teddy Sommavilla (wazazaby) merged commit 4f7a6e4 into main Sep 21, 2026
15 checks passed
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.

symfony 7.x support

1 participant