Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94686 invoked from network); 12 Sep 2011 13:43:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2011 13:43:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:48861] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/53-62506-A8C0E6E4 for ; Mon, 12 Sep 2011 09:43:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 3669270003F9 for ; Mon, 12 Sep 2011 14:43:34 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id VuYKR0NiNKBt for ; Mon, 12 Sep 2011 14:43:33 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id EC0D570003CE for ; Mon, 12 Sep 2011 14:43:33 +0100 (WEST) Received: from clk-0081.mshome.net (unknown [85.139.253.17]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id A5AC22008AE5 for ; Mon, 12 Sep 2011 14:43:33 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <4E6D0B5C.8030907@php.net> <4E6DF2A9.2040608@php.net> Date: Mon, 12 Sep 2011 14:43:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: <4E6DF2A9.2040608@php.net> User-Agent: Opera Mail/11.51 (Win32) Subject: Re: [PHP-DEV] [RFC] Factory for Stream Wrappers From: glopes@nebm.ist.utl.pt ("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 quite some side effects, with possible quite some BC breaks. This is a bit off-topic, but could you elaborate on this (possibly submitting a bug report)? I see user_wrapper_opener trying to call the constructor: http://lxr.php.net/opengrok/xref/PHP_5_3/main/streams/userspace.c#298 So any failure to do this would be a bug. BTW, another advantage of the proposed change is that you can have stream wrappers with constructors that take arguments. For the record, I'm in favor of this, even though I don't buy the testability claim. My point yesterday was mainly the RFC did not explain the advantages very clearly. -- Gustavo Lopes