[php-src] Issue #10506: Add StreamWrapperInterface

From: Date: Sat, 04 Feb 2023 19:02:24 +0000
Subject: [php-src] Issue #10506: Add StreamWrapperInterface
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243637@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10506 Author: xepozz ### Description I had to deal with https://www.php.net/manual/en/class.streamwrapper.php and faced with a problem that it's not a real class/interface reportedly documentation quote This is NOT a real class, only a prototype of how a class defining its own protocol should be.. But if you try to implement your own wrapper you may face with lots of errors like the method % does not exist. That's sad and I understand the base, but what do you think about adding just a common interface like [I have made](https://github.com/yiisoft/yii-debug/blob/24107de52cd5e013576bfc155fb8715dda2aaa24/src/Helper/StreamWrapper/StreamWrapperInterface.php) in the core? I'm sure that not only me did the same in their projects and this structured interface may have people to implement their own wrappers. I didn't deep into all possible usage combinations of the wrappers, but it would be great to separate the one onto a few interfaces by ISP principle. I may create the PR, but show me all places I need to change.

« previous php.bugs (#243637) next »