Hi internals,
I have opened a new RFC proposing improved error handling for invalid
integer-valued filter and flags options in the Filter extension.
The proposal introduces a deprecation period in PHP 8.7.
RFC: https://wiki.php.net/rfc/invalid_filter_options
Feedback and review are welcome.
Thanks,
Muhammed Arshid
Hi internals,
I have opened a new RFC proposing improved error handling for invalid integer-valued filter and flags options in the Filter extension.
The proposal introduces a deprecation period in PHP 8.7.
RFC: https://wiki.php.net/rfc/invalid_filter_options
Feedback and review are welcome.
Thanks,
Muhammed Arshid
Looks reasonable at first glance. My additional suggestions for
follow-on RFCs would be:
- The filter types could be turned into an enum. Would be a pretty
simple RFC. - Get rid of SAPI-side input filters for the superglobals; they
complicate code that works with them a bit. The INI option that
controls them is already deprecated, so, an RFC to get rid of them
completely?
I do think ext/filter is kind of weird in that the API is very pre-OO
and has a bunch of hardcoded filters and assumptions on how people used
the superglobals, but if we have it, it's still worth cleaning up.