Repository navigation
Story: Support Symfony Validator 5.4 through 8.x #22
Description
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/validatoraccepts 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
spatial-types1.0.0 #23[-]Support Symfony Validator 5.4 through 8.x[/-][+]Story: Support Symfony Validator 5.4 through 8.x[/+]