Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55387 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20413 invoked from network); 12 Sep 2011 14:56:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2011 14:56:47 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:48645] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/10-17954-DAD1E6E4 for ; Mon, 12 Sep 2011 10:56:46 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id BBD88700043E for ; Mon, 12 Sep 2011 15:56:41 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id qB6cwemzHHX6 for ; Mon, 12 Sep 2011 15:56:41 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 80738700043B for ; Mon, 12 Sep 2011 15:56:41 +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 3D3E320089B5 for ; Mon, 12 Sep 2011 15:56:41 +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 15:56:40 +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: 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 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 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. >> > > Not sure if it's actual, but this behaviour is documented: > http://de3.php.net/manual/en/streamwrapper.construct.php#94731 > 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 rmdir to be static and change the implementation to: * not instantiate an object if the method is static * keep the current behavior if it's not static (but emit E_STRICT) -- Gustavo Lopes