Re: Sanitize filters
| From: | Rowan Tommins | Date: | Mon, 03 Oct 2022 12:38:44 +0000 |
| Subject: | Re: Sanitize filters | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118732@lists.php.net to get a copy of this message | ||
On 3 October 2022 11:29:40 BST, Max Semenik <maxsem.wiki@gmail.com> wrote:
>пн, 3 окт. 2022 г., 03:18 David Gebler <davidgebler@gmail.com>:
>
>> At a glance, I think all the examples mentioned in this thread have better
>> existing alternatives already in core and could just be deprecated then
>> removed. But it's worth asking, is that what we're talking about here, or
>> is there a suggestion of replacing the filter API with a more modern,
>> object API?
>>
>
>Is there a compelling need to have this in the core, as opposed to Composer
>packages? The ecosystem has changed a lot since the original function was
>introduced.
Quite the opposite, in my opinion - there are compelling reasons *not* to have this in core.
It turns out that making a universal validation and sanitisation library is really hard, and
breaking changes and diverging needs are pretty much guaranteed. That's pretty much the worst
case for something distributed with the language, and exactly what Composer excels at.
The only thing that does belong in core are narrowly targeted low-level functions that someone might
use to build such a library. Certainly not some huge OO monster reimplementing the whole of
ext/filter and making a whole bunch of new mistakes.
Regards,
--
Rowan Tommins
[IMSoP]