-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: remove traditional validation rule param types (1/2) #8078
fix: remove traditional validation rule param types (1/2) #8078
Conversation
b0ff3b4
to
690d996
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the intent is to support anything that would have been juggled to a string then shouldn't our @param
tags be scalar|null
instead? And maybe also Stringable
?
I don't see much point in thinking too much about The traditional validation rules assumed strings. They were originally designed to validate POST data, so the values are all strings. I don't want the traditional rules to be used and would like to remove them, but I am not sure if apps migrated from older CIs will not have any problems when switching to the strict rules.. |
There is no guarantee that a string will be passed, so declaring strict types may result in a TypeError.
690d996
to
776b9cf
Compare
Added docs. |
Fair enough. This is basically a "pre-deprecation" change required so we can enact strict types. |
Description
Fixes #6489
To add
declare(strict_types=1)
. See #8072There is no guarantee that a string will be passed, so declaring strict types may result in a
TypeError
.Checklist: