Re: Reflection to remove final

From: Date: Wed, 18 Jan 2012 10:35:37 +0000
Subject: Re: Reflection to remove final
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-57406@lists.php.net to get a copy of this message
On Wed, 18 Jan 2012 00:00:09 +0100, Jan Dolecek <juzna.cz@gmail.com> wrote:
This issue seems much more complicated than I thought. We'll need to consider all cases which could cause troubles and have a solution for them. Namely: - rewriting permanent structures for internal classes, which are being kept between requests, must be avoided - races in threading models - rewriting in bytecode caches must be avoided - anything else in mind? I'll try to think about it, but I'm not that experienced with php internals, so any suggestions welcome.
I think you should approach it in a different way. Don't remove the final modifier, just ignore it in some circumstances (e.g. interface, annotation). PHP doesn't support annotations (at the engine level) and interface processing is currently done after checking the final class flag; additionally, there may be some code that relies final classes not having subclasses to this is probably still not going to be trivial. -- Gustavo Lopes

« previous php.internals (#57406) next »