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.
Constraint::CHECK_MODE_TYPE_CAST
was not actively used I would say noHi there,
I was running into the problem where
json_decode($input, true)
was not validation as I was hoping.To fix the problem I implemented a special
TypeCheckInterface
this will now be used to determine if something is a object, array and will do special logic to get properties etc.I need to add some special cases where tests failed because of the array structure.
To use the
json_decode($input, true)
with theValidator
a user must set the checkMode toConstraint::CHECK_MODE_TYPE_CAST
.I hope you like the PR and I'm looking forward to the comments.
Cheers,
Warnar