Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78035 invoked from network); 17 Jan 2012 21:27:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2012 21:27:18 -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.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:40769] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/F2-59894-2B7E51F4 for ; Tue, 17 Jan 2012 16:27:15 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id AB1277000446 for ; Tue, 17 Jan 2012 21:27:10 +0000 (WET) 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 OjltmfYane0L for ; Tue, 17 Jan 2012 21:27:10 +0000 (WET) 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 7455D700043F for ; Tue, 17 Jan 2012 21:27:10 +0000 (WET) Received: from damnation (unknown [IPv6:2001:470:94a2:1:64bb:b8a8:9a5d:a1d8]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id E18102007328 for ; Tue, 17 Jan 2012 21:27:07 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: Date: Tue, 17 Jan 2012 22:27:07 +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.60 (Win32) Subject: Re: [PHP-DEV] Reflection to remove final From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Mon, 16 Jan 2012 19:06:31 +0100, Jan Dolecek wrote: > Hi, > > reflection is a great tool for testing, but it still misses support > for mocking classes/methods marked as final. I created a small patch > https://gist.github.com/1621839#file_php_finals.patch, examples how to > use it https://gist.github.com/1621839#file_final_test.php and wrote a > short article explaining it: > http://blog.juzna.cz/2012/01/mock-vs-final-fights-in-testing/. > This doesn't seem right. Correct me if I'm wrong: for internal classes, their data structures are allocated permanently, so I'd say the effects of removing the flag would be permanent (i.e., would affect subsequent requests). And for threaded builds this could cause races between the threads. -- Gustavo Lopes