Re: Reflection to remove final
| From: | Jan Dolecek | Date: | Tue, 17 Jan 2012 12:40:57 +0000 |
| Subject: | Re: Reflection to remove final | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57391@lists.php.net to get a copy of this message | ||
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 <jpauli@php.net> wrote:
> Just one last word : The patch just adds setFinal() to ReflectionClass.
> What about ReflectionMethod ? Not very usefull for the mocking purpose, but
> that would be good for the Reflection API.
>
> Julien
>
> On Tue, Jan 17, 2012 at 12:00 PM, jpauli <jpauli@php.net> 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 <sebastian@php.net>wrote:
>>
>>> Am 17.01.2012 11:34, schrieb Pierre Joye:
>>> > Patch looks good, but coding standard.
>>>
>>> If there are no objections, I can fix the CS issue and commit the patch
>>> to trunk.
>>>
>>> --
>>> Sebastian Bergmann Co-Founder and Principal Consultant
>>> http://sebastian-bergmann.de/
>>> http://thePHP.cc/
>>>
>>> --
>>> PHP Internals - PHP Runtime Development Mailing List
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>