Re: Reflection to remove final

From: Date: Tue, 17 Jan 2012 13:07:47 +0000
Subject: Re: Reflection to remove final
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-57394@lists.php.net to get a copy of this message
Yes, there always is a reason. But when we test and create mocks, this reasons can go aside. This is the same with ReflectionProperty::setAccessible() etc. They shouldn't be used normally, but in special cases like testing it's necessary. Jan Dolecek juzna.cz@gmail.com On Tue, Jan 17, 2012 at 2:01 PM, Ferenc Kovacs <tyra3l@gmail.com> wrote: >> >> if a class is marked as final, there must be some reason for it to be a >> final. >> >> if you remove the final and extends it, may lead to bad error. >> >> > reflection should always be used with care. > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu

« previous php.internals (#57394) next »