You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time in such cases I would create own interface and wrap such classes probably. Just be aware that it gives such error right now:
PHP Fatal error: Call to a member function makeProphecyMethodCall()
on a non-object in .../vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(48): eval()'d code on line 105
The text was updated successfully, but these errors were encountered:
I'm not sure we should fix that on the framework level
You can easily fix it on application level - extend your class with all constructor, add __construct and call parent one in it. This will give you modern API to work with and ability to spec it.
After thinking a bit I think we should support old constructors. Not because it's right, but because I don't want Prophecy users to frustrate of code that doesn't belong to them.
Sometimes we want to create doubles for old libs/classes like https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Net/SSH2.php#L741
Mockery had simillar issue mockery/mockery#139
Most of the time in such cases I would create own interface and wrap such classes probably. Just be aware that it gives such error right now:
The text was updated successfully, but these errors were encountered: