Skip to content

[IT9PE1-29241] Allow Symfony 8 - #94

Merged
fguimier merged 1 commit into
mainfrom
florian_IT9PE1-29241_symfony-8-support
Aug 25, 2026
Merged

[IT9PE1-29241] Allow Symfony 8#94
fguimier merged 1 commit into
mainfrom
florian_IT9PE1-29241_symfony-8-support

Conversation

@fguimier

@fguimier fguimier commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What

Symfony 8 support — the only bundle of the wave needing real code changes:

  • AssoConnectValidatorExtension now extends Symfony\Component\DependencyInjection\Extension\Extension: the HttpKernel variant is removed in Symfony 8, and the DI one exists on Symfony 7 too.
  • FrenchRna, FrenchSiren, FrenchSiret no longer accept the legacy $options array (that constructor path is removed from Constraint/Luhn in Symfony 8) and call their parent constructors with named arguments. All in-repo and backend usages already use named arguments or no arguments — verified, none passes $options.
  • Every constraint with a custom constructor is flagged #[HasNamedArguments] (Email, FloatScale, Money, Postal, FrenchRna, FrenchSiren, FrenchSiret) so mapping loaders avoid the removed options-array path.
  • composer.json: symfony/* widened to ^7.0|^8.0, doctrine/doctrine-bundle to ^2.12|^3.0 (DoctrineBundle 2.x caps Symfony at 7 — without this the highest-deps CI job would silently keep testing Symfony 7).
  • Dropped a stale phpstan-baseline entry for the removed $options parameter.

Why

The backend upgrade to Symfony 8.1 needs every assoconnect bundle to accept Symfony 8. This bundle is the critical path: php-percent-bundle and php-date-bundle hard-require it and can only follow once it ships.

CI caveat — resolved ✅

The initial CI run was Symfony-8-blind: assoconnect/absolute-percent-value-bundle ^1.5 capped Symfony at 7 until its widened release existed. v1.6.0 was released on 2026-08-25 and the CI was re-run: all jobs green, and the highest job log confirms it now installs symfony/validator v8.1.5 + absolute-percent-value-bundle v1.6.0 — Symfony 8 is genuinely exercised.

Test plan

  • CI matrix (PHP 8.4/8.5 × lowest/highest) fully green post re-run, with Symfony 8.1.5 actually resolved on highest (verified in the job log).
  • Local gates in the open-source container (PHP 8.4):
    • Highest: Symfony 8.1.5 + DoctrineBundle 3.3.1 — phpcs ✅, phpstan ✅ no errors, phpunit ✅ 295 tests / 485 assertions
    • Lowest (--prefer-lowest): Symfony 7.0 + DoctrineBundle 2.12.0 — phpunit ✅ 295 tests
    • composer validate --strict

Refs IT9PE1-29241

Shipping

Merging this PR ships nothing: it needs a semver tag / GitHub release, then a
composer require assoconnect/validator-bundle:^x.y bump PR in the backend. Two reviews total.

Constructor signatures of FrenchRna/FrenchSiren/FrenchSiret changed (legacy $options parameter dropped): flagging for the reviewer — all known consumers use named arguments, proposal is a minor release, consistent with Symfony 8 dropping the same path.

- AssoConnectValidatorExtension now extends the DependencyInjection
  Extension class: the HttpKernel one is removed in Symfony 8, and the
  DI one exists on Symfony 7 too.
- FrenchRna, FrenchSiren and FrenchSiret no longer accept the legacy
  $options array (removed from Constraint/Luhn constructors in
  Symfony 8) and call their parent constructor with named arguments.
- All constraints with a custom constructor are flagged with
  #[HasNamedArguments] so mapping loaders instantiate them without the
  deprecated options-array path.
- composer.json: symfony/* widened to ^7.0|^8.0, doctrine-bundle to
  ^2.12|^3.0 (DoctrineBundle 2.x caps Symfony at 7, which would let the
  highest-deps CI silently test Symfony 7 only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@fguimier
fguimier merged commit 82d1bb7 into main Aug 25, 2026
9 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.

1 participant