fix: preserve null values in Validation::getValidated()#10101
fix: preserve null values in Validation::getValidated()#10101michalsn wants to merge 1 commit intocodeigniter4:developfrom
Conversation
neznaika0
left a comment
There was a problem hiding this comment.
I hope that no one disrupts their work.
f639fac to
0bbff2f
Compare
|
Did cs-fixer get new rules? |
|
@neznaika0 I guess a new version of cs-fix was released. @paulbalandan Is that okay, or do we want to fix this another way? |
|
Why did I ask, if you changed it manually, we decided that the prefix for |
I did not change anything. The error popped up after rebase. |
|
php-cs-fixer has a new release with few new fixers and options. I think we should fix this separately. for psalm, I'm thinking of instead of separate phpstan-type and psalm-type, can we just type those in the |
0cc9d84 to
5fff035
Compare
|
@paulbalandan As I said, we discussed it in PR with you and came to the conclusion that we are so strongly attached to phpstan that we don't need to use prefixes. For psalm, I do not know if it has annotation differences. |
|
Yes, that's what I'm proposing here. I'll make a PR for the cs fixes and for psalm. |
Description
This PR fixes a validation bug where
Validation::getValidated()could drop fields whose validated value was explicitlynull.The issue came from
DotArrayFilter, which treatednulllike a missing key when building the validated data array. With this change, explicitnullvalues are preserved, so validated output stays consistent with the original validated input, including cases such aspermit_empty.Checklist: