Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Pierre Joye
hi! I like the idea to improve this area. However I'm with Stas here. I do not feel comfortable enough with this RFC to agree to get into 5.4 at this stage. It is a sensible area and we are already late (because of the tests) with the 5.4 release plan. Next will begin in spring next year, not too

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Stas Malyshev
Hi! On 9/12/11 3:45 PM, Gustavo Lopes wrote: It's a change in behavior so it makes sense. Those operations are wrapper operations and by their nature they are static operations, meaning a stream instance is not required. See the difference between php_stream_ops and php_stream_wrapper_ops. It wo

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Gustavo Lopes
On Mon, 12 Sep 2011 18:00:13 +0100, Hannes Magnusson wrote: On Mon, Sep 12, 2011 at 16:56, Gustavo Lopes wrote: Ah, right. stat() and unlink() should have been static in the first place. Given the circumstances, it might be a good idea, to document url_stat, unlink, rename, mkdir and rmdi

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Hannes Magnusson
On Mon, Sep 12, 2011 at 16:56, Gustavo Lopes wrote: > Em Mon, 12 Sep 2011 15:40:20 +0100, Christian Kaps > escreveu: > >> On Mon, 12 Sep 2011 14:43:33 +0100, Gustavo Lopes wrote: >>> >>> Em Mon, 12 Sep 2011 12:53:13 +0100, Sebastian Bergmann >>>  escreveu: >>>  Regarding state it is importa

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Gustavo Lopes
Em Mon, 12 Sep 2011 15:40:20 +0100, Christian Kaps escreveu: On Mon, 12 Sep 2011 14:43:33 +0100, Gustavo Lopes wrote: Em Mon, 12 Sep 2011 12:53:13 +0100, Sebastian Bergmann escreveu: Regarding state it is important to notice that PHP does *not* execute the constructor on all low level

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Christian Kaps
On Mon, 12 Sep 2011 14:43:33 +0100, Gustavo Lopes wrote: Em Mon, 12 Sep 2011 12:53:13 +0100, Sebastian Bergmann escreveu: Regarding state it is important to notice that PHP does *not* execute the constructor on all low level calls when instantiating the wrapper class - for whatever reason

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Gustavo Lopes
Em Mon, 12 Sep 2011 12:53:13 +0100, Sebastian Bergmann escreveu: Regarding state it is important to notice that PHP does *not* execute the constructor on all low level calls when instantiating the wrapper class - for whatever reason that is the case. Changing that behaviour would cause qu

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-12 Thread Sebastian Bergmann
Am 12.09.2011 00:26, schrieb Gustavo Lopes: > A patch against trunk (or 5.4) would have been nicer. Other than that: > * This patch has a huge BC: Johannes already said that he is updating his patch. It is not our intention to break BC, we only want to add additional/optional behaviour. > Coul

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-11 Thread Johannes Schlüter
Hi, On Sun, 2011-09-11 at 23:26 +0100, Gustavo Lopes wrote: > On Sun, 11 Sep 2011 20:26:20 +0100, Sebastian Bergmann > wrote: > > > [...] > > -- > > [1] https://wiki.php.net/rfc/streamwrapper-factory > > [2] http://schlueters.de/~johannes/php/stream_factory.diff > > > > A patch against tr

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-11 Thread Gustavo Lopes
On Sun, 11 Sep 2011 20:26:20 +0100, Sebastian Bergmann wrote: [...] -- [1] https://wiki.php.net/rfc/streamwrapper-factory [2] http://schlueters.de/~johannes/php/stream_factory.diff A patch against trunk (or 5.4) would have been nicer. Other than that: * This patch has a huge BC: PHP

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-11 Thread Sebastian Krebs
Hi, Am 11.09.2011 23:40, schrieb Anthony Ferrara: So, based on the rfc, does "must return an instance" mean that it can't throw an exception (ex: if a resource couldn't be opened)? A resource is opened on `streamWrapper::dir_opendir()` or `streamWrapper::stream_open()` anyway, but not on Wrap

Re: [PHP-DEV] [RFC] Factory for Stream Wrappers

2011-09-11 Thread Anthony Ferrara
So, based on the rfc, does "must return an instance" mean that it can't throw an exception (ex: if a resource couldn't be opened)? On Sep 11, 2011 3:26 PM, "Sebastian Bergmann" wrote: > We (Arne Blankerts, Stefan Priebsch, Benjamin Eberlei, and I) have > worked on/with code where a factory for str