Releases: phpspec/prophecy
Releases · phpspec/prophecy
v1.5.0 (PHP7 support)
v1.4.1
v1.4.0
- Fixed errors in return type phpdocs (thanks @sobit)
- Fixed stringifying of hash containing one value (thanks @avant1)
- Improved clarity of method call expectation exception (thanks @dantleech)
- Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
- Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
- Support for mocking classes with methods that return references (thanks @edsonmedina)
- Improved object comparison (thanks @whatthejeff)
- Adopted '^' in composer dependencies (thanks @GrahamCampbell)
- Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
- Magic methods are now filtered for keywords (thanks @seagoj)
- More readable errors for failure when expecting single calls (thanks @dantleech)
Spies fix
HHVM compatibility
- Added support for HHVM
Improvements and bugfixes
- Changed the generated class names to use a static counter instead of a random number
- Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
- Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
- Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
- Added support for properties in ObjectStateToken (thanks @adrienbrault)
- Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
- Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
- Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
- Added StringContainToken and Argument::containingString() (thanks @peterjmit)
- Added
shouldNotHaveBeenCalled
on the MethodProphecy (thanks @ciaranmcnulty) - Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
- Deprecated
shouldNotBeenCalled
in favor ofshouldNotHaveBeenCalled
1.0.4 - bugfix
1.0.3 - bugfix
- Support callable typehints (thanks @stof)
- Do not attempt to autoload arrays when generating code (thanks @marcodebortoli)
- New ArrayEntryToken (thanks @kagux)
1.0.2 - logical argument operators
1.0.1 - bugfix
- Fix broken UnexpectedCallException message
- Trim AggregateException message