On Thu, Nov 12, 2020 at 7:00 AM Pierre <pierre-...@processus.org> wrote:
> This might be a stupid question, or it may have already been answered > tons of times, but is there any valid reason for not having a > StreamWrapper interface as documented there: > https://www.php.net/manual/en/class.streamwrapper.php > > Or if some methods are optional, multiple interfaces, or if all methods > are optional, an abstract base class in PHP standard library ? > > Many methods are optional, but more generically it's that user-space wrappers date to PHP 4.3 and like... did we ever HAVE interfaces at that point? Or abstract classes? It was a different time, man. You were there, you know what it was like... Honestly, I kind of regard the state of PHP's filesystem libraries to be one big hot mess. I'd really much rather redesign them from the ground up with some BC shims to avoid breaking the world, but I lack the drive to make that happen at the moment. -Sara