-
Notifications
You must be signed in to change notification settings - Fork 700
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
[QueryParam] Nullable array with validation #960
Comments
If parameter is array then FOSRestBundle/Request/ParamFetcher.php Line 138 in 2437a4f
If we use both
@lsmith77 , what do you think? |
@eugef @lsmith77 This behavior is better. |
+1 |
+1 |
@eliecharra , at line FOSRestBundle/Request/ParamFetcher.php Line 126 in 2437a4f
strict also should be replaced with nullable
And probably tests should be adjusted for the new behavior. |
if someone sends a PR I can quickly release |
can you all test the PR as well? want to make sure I do not get another regression and I do not have a good code base I can use for testing this beyond our tests. |
Just tried to add a test to cover #910 break but couldn't make it work, if someone has some time ... |
In 1.4.2 I had the following behaviour to allow an optional array param and array item validation when array is not null :
Now in 1.5.0 when I submit an empty param I get
Seems like #910 is breaking this in 1.5.0.
I would like to allow an empty array param but dont wanna loose the validation.
If I set strict to false i'm loosing array items validation.
Easy to reproduce with the above annotation.
Is my initial annotation badly crafted or a BC break ?
I have not looked into the code, but it seems like nullable param for an array is not considered.
The text was updated successfully, but these errors were encountered: