Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23090 invoked from network); 17 Jan 2012 12:41:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2012 12:41:22 -0000 Authentication-Results: pb1.pair.com header.from=juzna.cz@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=juzna.cz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: juzna.cz@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:56064] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/04-02309-17C651F4 for ; Tue, 17 Jan 2012 07:41:21 -0500 Received: by ggnq4 with SMTP id q4so1026098ggn.29 for ; Tue, 17 Jan 2012 04:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=F9FaGx0CkQw9IWXkOxKNRT6EXGVnSdTLjgM9bOaeY6A=; b=lQAbsF64wblkKmiEKM+yaxWcWdgotxF9m9IAWN9zvioQHwSl3DP7PcH7IZGmSRAiym z1vKo968XMQz1/10SP8r3DCU25kK1cDMfTBw7klO3jy7QhCf/5EV57PjFoKLXFkurwU1 1vXkn+JbbobqT8u0AY/vCpjpYt7uNhmgk6bwI= Received: by 10.50.193.229 with SMTP id hr5mr17439823igc.15.1326804078510; Tue, 17 Jan 2012 04:41:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.203.81 with HTTP; Tue, 17 Jan 2012 04:40:57 -0800 (PST) In-Reply-To: References: <4F155351.7030505@php.net> Date: Tue, 17 Jan 2012 13:40:57 +0100 Message-ID: To: jpauli Cc: Sebastian Bergmann , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Reflection to remove final From: juzna.cz@gmail.com (Jan Dolecek) setFinal is available for both classes and methods, as shown in example in my gist (https://gist.github.com/1621839#file_final_test.php). This should be enough for all possible mocks, as I discussed it with my friends. It is also possible to remove final, create a mock class and then put it back, if someone wants to keep it after mocks have been created. Sorry about my CS, I'll be more careful next time. I wanted to make a proof of concept quickly to try it in PHP. Jan Dolecek juzna.cz@gmail.com On Tue, Jan 17, 2012 at 12:03 PM, jpauli wrote: > Just one last word : The patch just adds setFinal() to ReflectionClass. > What about ReflectionMethod ? Not very usefull for the mocking purpose, b= ut > that would be good for the Reflection API. > > Julien > > On Tue, Jan 17, 2012 at 12:00 PM, jpauli wrote: > >> +1, I like the idea as well. >> How didn't we think about that earlier... ? >> >> Julien >> >> >> On Tue, Jan 17, 2012 at 11:54 AM, Sebastian Bergmann = wrote: >> >>> Am 17.01.2012 11:34, schrieb Pierre Joye: >>> > Patch looks good, but coding standard. >>> >>> =C2=A0If there are no objections, I can fix the CS issue and commit the= patch >>> =C2=A0to trunk. >>> >>> -- >>> Sebastian Bergmann =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Co-Founder and Principal Consultant >>> http://sebastian-bergmann.de/ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://thePHP.cc/ >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>