Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55919 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43635 invoked from network); 24 Oct 2011 14:13:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2011 14:13:29 -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.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:43297] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/12-29955-68275AE4 for ; Mon, 24 Oct 2011 10:13:27 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 9186F700038E; Mon, 24 Oct 2011 15:13:22 +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 pG6igiOf2hQ2; Mon, 24 Oct 2011 15:13:22 +0100 (WEST) Received: from nebm.ist.utl.pt (unknown [IPv6:2001:690:2100:4::58:1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 3BA7570003D7; Mon, 24 Oct 2011 15:13:22 +0100 (WEST) Received: from localhost ([127.0.0.1] helo=clk-0081.mshome.net) by nebm.ist.utl.pt with esmtp (Exim 4.72) (envelope-from ) id 1RILHG-0004CO-5R; Mon, 24 Oct 2011 15:13:22 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Cc: "Etienne Kneuss" In-Reply-To: Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= References: To: internals@lists.php.net MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 24 Oct 2011 15:13:21 +0100 Message-ID: User-Agent: Opera Mail/11.51 (Win32) Subject: Re: [PHP-DEV] BC break in 5.4, extending internal class From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Em Mon, 24 Oct 2011 14:53:07 +0100, Pierre Joye escreveu: > https://bugs.php.net/bug.php?id=55300 > and in some extend to https://bugs.php.net/bug.php?id=55175 > > I tend to think that it could have a very bad impact on existing and > will prevent many users to migrate easily to 5.4, or smoothly. I think > we have to figure a fix for this problem while making it 100% BC with > 5.3. I'd to discuss this problem before we go with the 1st RC. > (context: this is the problem of calling internal methods on objects that were not properly constructed). The change I did in 5.4 should be reverted and synced with 5.3 in the short term because it doesn't work reliably (even not considering the BC break) -- there are other methods for getting an invalid instance (the new reflection method and unserialize, at least). But even in 5.3, there are in SPL counter-measures that don't work reliably, like making a check in get_method. Last month, Etienne was exploring the possibilities for this problem, but I don't think he got to any good solution. In the medium term, either direct calls to zend_object_store_get_object are banned and every method goes through a class-specific wrapper or we come up with a better solution (the only think I came up with in the discussion last time was enforcing the restriction on zend_do_fcall_common_helper/zend_call_function by calling a validation callback stored in the class_entry every time an internal method is to be called). -- Gustavo Lopes