Re: Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13
| From: | Stas Malyshev | Date: | Sat, 26 Jul 2014 21:47:46 +0000 |
| Subject: | Re: Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76163@lists.php.net to get a copy of this message | ||
Hi!
> nope, some mock frameworks do that (afair atoum for example) but
> phpunit(phpunit-mock-objects to be more precise) was using the serialize
> trick and newInstanceWithoutConstructor()
>
> (https://github.com/sebastianbergmann/phpunit-mock-objects/blob/42f29d650744fd7ce785e7a4dd3598a09b0bfd2b/src/Framework/MockObject/Generator.php#L273),
It does that too. But at least in version 3 it was also generating and
eval'ing classes, in PHPUnit_Framework_MockObject_Generator. Looking here:
https://github.com/sebastianbergmann/phpunit-mock-objects/tree/master/src/Framework/MockObject
It is still doing class generation and evals. Not sure why it doesn't
also override the ctor, maybe it was for some implementation consideration.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/