I've just been looking back at the history of this previous conversation...
http://marc.info/?l=php-internals&m=132673741606531&w=2 as a mockist tester I'd really REALLY like to see this be possible but I can see the problem with the original patch modifying the actual existing class. One solution I propose is rather than modify it would it be possible for the reflection class to be able to duplicate the class with the finals removed so something like this could be possible: final class A { } $r = new ReflectionClass('A'); $r->defineExtendableClass('ExtendableA'); class MockA extends ExtendabledA { } I'm unfamiliar with the PHP codebase so I thought I'd just ask here to find out if it sounds possible before diving into the code Thoughts? Regards, Tom