diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a130887..fb66a3ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Disabled API Platform's legacy query-parameter validation system + (`legacy_query_parameter_validation: false`): its classes self-deprecate on load since 3.4, + spamming the `php` log channel on every request, and none of our filters declare the + constraints it enforces. The component is removed in API Platform 4. + ## [3.0.0-rc6] - 2026-06-10 - Fixed the 2.x → 3.0 screen client auto-upgrade path: images and the release tarball now also diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 2ac60f9d..c55fecaa 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -39,6 +39,14 @@ api_platform: doctrine: enabled: true + validator: + # Don't register API Platform's legacy query-parameter validation + # system (ApiPlatform\ParameterValidator\...): its validator classes + # self-deprecate on load since 3.4, and none of our filters declare + # the constraints it enforces (all are required => false, no + # enum/bounds/length). The component is removed in API Platform 4. + legacy_query_parameter_validation: false + swagger: versions: [3] # api_keys: @@ -57,7 +65,6 @@ api_platform: # The 4 following handlers are registered by default, keep those lines to prevent unexpected side effects Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # Use a raw status code (recommended) ApiPlatform\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST - ApiPlatform\ParameterValidator\Exception\ValidationExceptionInterface: 400 Doctrine\ORM\OptimisticLockException: 409 # Validation exception