Skip to content

Story: Support Symfony Validator 5.4 through 8.x #22

Closed

Description

@Alexandre-T

Support Symfony Validator 5.4 through 8.x

As a developer using spatial-types,
I want the library to support Symfony Validator versions from 5.4 through 8.x,
so that spatial-types does not unnecessarily restrict the Symfony Validator version used by consuming applications.

Context

spatial-types currently requires:

"symfony/validator": "^8.1"

The library only relies on stable Symfony Validator APIs that are available in earlier versions of the component.

The supported API surface includes notably:

  • Constraint;
  • ConstraintValidator;
  • Validation;
  • ConstraintViolationListInterface;
  • UnexpectedTypeException;
  • UnexpectedValueException;
  • the standard constraint violation building mechanism.

The library requires PHP 8.4 or later independently of the minimum PHP versions supported by the individual Symfony Validator releases.

Symfony Validator 5.4, 6.4, 7.x and 8.x must therefore be accepted when they are compatible with the PHP version required by spatial-types.

Compatibility must not only be declared through Composer. It must also be verified by executing the complete test suite against representative versions of each supported Symfony generation.

Acceptance Criteria

  • The Composer constraint for symfony/validator accepts Symfony Validator 5.4.
  • The Composer constraint accepts Symfony Validator 6.x.
  • The Composer constraint accepts Symfony Validator 7.x.
  • The Composer constraint accepts Symfony Validator 8.x.
  • The Composer constraint does not accept Symfony Validator versions earlier than 5.4.
  • The Composer constraint does not implicitly accept a future Symfony Validator 9.x release.
  • The resulting Composer constraint is equivalent to ^5.4 || ^6.0 || ^7.0 || ^8.0.
  • The CI explicitly installs Symfony Validator 5.4 and runs the complete local test suite against it.
  • The CI explicitly installs Symfony Validator 6.4 and runs the complete local test suite against it.
  • The CI explicitly installs Symfony Validator 7.4 and runs the complete local test suite against it.
  • The CI explicitly installs Symfony Validator 8.1 and runs the complete local test suite against it.
  • Each tested Symfony Validator version is forced before the test suite is executed, so the test does not merely rely on Composer's default dependency resolution.
  • A failure with any explicitly supported Symfony Validator version causes the CI job to fail.
  • Existing PHP compatibility checks continue to run.
  • No production code is changed solely to emulate behavior specific to one Symfony Validator version.
  • The complete test suite passes with every tested Symfony Validator version.
  • All existing project quality checks pass.

Compatibility Matrix

Symfony Validator Expected support CI verification
< 5.4 No No
5.4.x Yes Forced
6.4.x Yes Forced
7.4.x Yes Forced
8.1.x Yes Forced
9.x No No

Technical Notes

The CI must verify the version actually installed by Composer before running the tests.

The compatibility jobs should exercise the same test command used for local validation rather than maintaining a separate reduced test suite.

Testing 5.4, 6.4, 7.4 and 8.1 provides representative compatibility checks across each supported Symfony Validator major generation while the Composer constraint allows compatible intermediate releases within those generations.

Activity

  1. added this to the Version 1.0.0 milestone on Oct 4, 2026
  2. added theissue type on Oct 4, 2026
  3. changed the title [-]Support Symfony Validator 5.4 through 8.x[/-] [+]Story: Support Symfony Validator 5.4 through 8.x[/+] on Oct 5, 2026
  4. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

impact:dependencyAffects dependencies or compatibility

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions