feat(filter): proposal about uuid validation#5394
Closed
jewome62 wants to merge 1 commit into
Closed
Conversation
jewome62
force-pushed
the
feature/filter-validation-uuid
branch
from
February 8, 2023 13:23
e50dff8 to
3b34276
Compare
Member
|
There's a feature called Query Parameter Validation (#1723) that should help you do exactly that but not a the query level. Maybe it is more appropriate? Sorry there aren't much documentation on the subject and there's an on-going process to improve that part. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation :
Currently, if you filter on uuid typed field with SearchFilter and the uuid is not valid. You have a DriverException about SQL fail
(tested on Postgresql)
Proposal :
Catch as the int validation, the bad uuid with
hasValidValuesSo firstly, what do you think about that ?
And secondly, do you have idea to manage Custom UUID type from third dependency (Ramsey or Symfony) for make
DOCTRINE_UUID_TYPEconstant.And third, I did not see some test currently the
hasValidValuesbehavior. Do you have some functional test about that ? I did not find them.