On Sat, Aug 9, 2014 at 12:35 PM, Tom Oram <t...@scl.co.uk> wrote: > 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 >
apart from the thread you linked, we also touched this topic in the following pull request: https://github.com/php/php-src/pull/733 -- Ferenc Kovács @Tyr43l - http://tyrael.hu