Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate query parameter validator #6454

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Jul 5, 2024

The idea here is that we deprecate the QueryParameterValidator in 3.4 in favor of using the new parameter attributes (QueryParameter and HeaderParameter). By doing so, we introduce a backward compatibility flag:

defaults: 
    extra_properties:
        use_legacy_parameter_validator: true

This flag is true by default in 3.4 and gets removed in 4.0. When using false we add parameters for each declared filter and validation will still be effective (according to $queryParameterValidationEnabled). A few changes occur though (hence the flag):

Left tbd:

  • add the queryParameterValidationEnabled everywhere (as it also applies to graphql args)
  • add a deprecation when the use_legacy_parameter_validator is not false
  • fix tests

@soyuka soyuka force-pushed the deprecate-filter-validator-2 branch 9 times, most recently from 7a8cc44 to c1cb655 Compare July 8, 2024 09:05
@soyuka soyuka force-pushed the deprecate-filter-validator-2 branch from c1cb655 to 4174ad0 Compare July 8, 2024 09:31
@soyuka soyuka merged commit 26d5cbb into api-platform:3.4 Jul 8, 2024
76 of 78 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