You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
11 KiB

3 years ago
  1. 1.13.0 / 2021/03/17
  2. ===================
  3. * [added] willYield can now specify a return value [@camilledejoye]
  4. * [added] Prophecy exception interfaces are explicitly Throwable [@ciaranmcnulty]
  5. * [fixed] Argument::in() and notIn() now marked as static [@tyteen4a03]
  6. * [fixed] Can now double unions containing false [@ciaranmcnulty]
  7. * [fixed] Virtual magic methods with arguments are now doublable in PHP 8 [@ciaranmcnulty]
  8. 1.12.2 / 2020/12/19
  9. ===================
  10. * [fixed] MethodNotFoundException sometimes thrown with wrong class attached [@ciaranmcnulty]
  11. 1.12.1 / 2020/10/29
  12. ===================
  13. * [fixed] Incorrect handling of inherited 'self' return types [@ciaranmcnulty]
  14. 1.12.0 / 2020/10/28
  15. ===================
  16. * [added] PHP 8 support [@ciaranmcnulty]
  17. * [added] Argument::in() and Argument::notIn() [@viniciusalonso]
  18. * [added] Support for union and mixed types [@ciaranmcnulty]
  19. * [fixed] Issues caused by introduction of named parameters [@ciaranmcnulty]
  20. * [fixed] Issues caused by stricter rounding [@ciaranmcnulty]
  21. 1.11.1 / 2020/07/08
  22. ===================
  23. * [fixed] can't double objects with `self` type hints (@greg0ire)
  24. * [fixed] cloned doubes were not loosely comparable (@tkulka)
  25. 1.11.0 / 2020/07/07
  26. ===================
  27. * [changed] dropped support for PHP versions earlier than 7.2 (@ciaranmcnulty)
  28. * [fixed] removed use of Reflection APIs deprecated in PHP 8.0 (@Ayesh)
  29. 1.10.3 / 2020/03/05
  30. ===================
  31. * [fixed] removed fatal error when phpdocumentor/reflection-docblock 5 parses an invalid `@method` tag (@stof)
  32. 1.10.2 / 2020/01/20
  33. ===================
  34. * [added] support for new versions of `sebastian/comparator` and `sebastian/recursion-context` (@sebastianbergmann)
  35. 1.10.1 / 2019/12/22
  36. ===================
  37. * [fixed] identical callables no longer match as arguments (@ciaranmcnulty)
  38. 1.10.0 / 2019/12/17
  39. ===================
  40. * [added] shouldHaveBeenCalled evaluation happens later so un-stubbed calls don't throw (@elvetemedve)
  41. * [added] methods can now be doubled case-insensitively to match PHP semantics (@michalbundyra)
  42. * [fixed] reduced memory usage by optimising CachedDoubler (@DonCallisto)
  43. * [fixed] removed fatal error nesting level when comparing large objects (@scroach)
  44. 1.9.0 / 2019/10/03
  45. ==================
  46. * [added] Add willYield feature to Method Prophecy(@tkotosz)
  47. * [fixed] Allow `MethodProphecy::willThrow()` to accept Throwable as string (@timoschinkel )
  48. * [fixed] Allow new version of phpdocumentor/reflection-docblock (@ricpelo)
  49. 1.8.1 / 2019/06/13
  50. ==================
  51. * [fixed] Don't try to patch final constructors (@NiR)
  52. 1.8.0 / 2018/08/05
  53. ==================
  54. * Support for void return types without explicit will (@crellbar)
  55. * Clearer error message for unexpected method calls (@meridius)
  56. * Clearer error message for aggregate exceptions (@meridius)
  57. * More verbose `shouldBeCalledOnce` expectation (@olvlvl)
  58. * Ability to double Throwable, or methods that extend it (@ciaranmcnulty)
  59. * [fixed] Doubling methods where class has additional arguments to interface (@webimpress)
  60. * [fixed] Doubling methods where arguments are nullable but default is not null (@webimpress)
  61. * [fixed] Doubling magic methods on parent class (@dsnopek)
  62. * [fixed] Check method predictions only once (@dontub)
  63. * [fixed] Argument::containingString throwing error when called with non-string (@dcabrejas)
  64. 1.7.6 / 2018/04/18
  65. ==================
  66. * Allow sebastian/comparator ^3.0 (@sebastianbergmann)
  67. 1.7.5 / 2018/02/11
  68. ==================
  69. * Support for object return type hints (thanks @greg0ire)
  70. 1.7.4 / 2018/02/11
  71. ==================
  72. * Fix issues with PHP 7.2 (thanks @greg0ire)
  73. * Support object type hints in PHP 7.2 (thanks @@jansvoboda11)
  74. 1.7.3 / 2017/11/24
  75. ==================
  76. * Fix SplInfo ClassPatch to work with Symfony 4 (Thanks @gnugat)
  77. 1.7.2 / 2017-10-04
  78. ==================
  79. * Reverted "check method predictions only once" due to it breaking Spies
  80. 1.7.1 / 2017-10-03
  81. ==================
  82. * Allow PHP5 keywords methods generation on PHP7 (thanks @bycosta)
  83. * Allow reflection-docblock v4 (thanks @GrahamCampbell)
  84. * Check method predictions only once (thanks @dontub)
  85. * Escape file path sent to \SplFileObjectConstructor when running on Windows (thanks @danmartin-epiphany)
  86. 1.7.0 / 2017-03-02
  87. ==================
  88. * Add full PHP 7.1 Support (thanks @prolic)
  89. * Allow `sebastian/comparator ^2.0` (thanks @sebastianbergmann)
  90. * Allow `sebastian/recursion-context ^3.0` (thanks @sebastianbergmann)
  91. * Allow `\Error` instances in `ThrowPromise` (thanks @jameshalsall)
  92. * Support `phpspec/phpspect ^3.2` (thanks @Sam-Burns)
  93. * Fix failing builds (thanks @Sam-Burns)
  94. 1.6.2 / 2016-11-21
  95. ==================
  96. * Added support for detecting @method on interfaces that the class itself implements, or when the stubbed class is an interface itself (thanks @Seldaek)
  97. * Added support for sebastian/recursion-context 2 (thanks @sebastianbergmann)
  98. * Added testing on PHP 7.1 on Travis (thanks @danizord)
  99. * Fixed the usage of the phpunit comparator (thanks @Anyqax)
  100. 1.6.1 / 2016-06-07
  101. ==================
  102. * Ignored empty method names in invalid `@method` phpdoc
  103. * Fixed the mocking of SplFileObject
  104. * Added compatibility with phpdocumentor/reflection-docblock 3
  105. 1.6.0 / 2016-02-15
  106. ==================
  107. * Add Variadics support (thanks @pamil)
  108. * Add ProphecyComparator for comparing objects that need revealing (thanks @jon-acker)
  109. * Add ApproximateValueToken (thanks @dantleech)
  110. * Add support for 'self' and 'parent' return type (thanks @bendavies)
  111. * Add __invoke to allowed reflectable methods list (thanks @ftrrtf)
  112. * Updated ExportUtil to reflect the latest changes by Sebastian (thanks @jakari)
  113. * Specify the required php version for composer (thanks @jakzal)
  114. * Exclude 'args' in the generated backtrace (thanks @oradwell)
  115. * Fix code generation for scalar parameters (thanks @trowski)
  116. * Fix missing sprintf in InvalidArgumentException __construct call (thanks @emmanuelballery)
  117. * Fix phpdoc for magic methods (thanks @Tobion)
  118. * Fix PhpDoc for interfaces usage (thanks @ImmRanneft)
  119. * Prevent final methods from being manually extended (thanks @kamioftea)
  120. * Enhance exception for invalid argument to ThrowPromise (thanks @Tobion)
  121. 1.5.0 / 2015-04-27
  122. ==================
  123. * Add support for PHP7 scalar type hints (thanks @trowski)
  124. * Add support for PHP7 return types (thanks @trowski)
  125. * Update internal test suite to support PHP7
  126. 1.4.1 / 2015-04-27
  127. ==================
  128. * Fixed bug in closure-based argument tokens (#181)
  129. 1.4.0 / 2015-03-27
  130. ==================
  131. * Fixed errors in return type phpdocs (thanks @sobit)
  132. * Fixed stringifying of hash containing one value (thanks @avant1)
  133. * Improved clarity of method call expectation exception (thanks @dantleech)
  134. * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
  135. * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
  136. * Support for mocking classes with methods that return references (thanks @edsonmedina)
  137. * Improved object comparison (thanks @whatthejeff)
  138. * Adopted '^' in composer dependencies (thanks @GrahamCampbell)
  139. * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
  140. * Magic methods are now filtered for keywords (thanks @seagoj)
  141. * More readable errors for failure when expecting single calls (thanks @dantleech)
  142. 1.3.1 / 2014-11-17
  143. ==================
  144. * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()`
  145. 1.3.0 / 2014-11-14
  146. ==================
  147. * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()`
  148. * Fix HHVM compatibility
  149. * Remove dead code (thanks @stof)
  150. * Add support for DirectoryIterators (thanks @shanethehat)
  151. 1.2.0 / 2014-07-18
  152. ==================
  153. * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz)
  154. * Fixed a segfault appearing in some cases (thanks @dmoreaulf)
  155. * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener)
  156. * Added support for internal classes using keywords as method names (thanks @milan)
  157. * Added IdenticalValueToken and Argument::is (thanks @florianv)
  158. * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff)
  159. 1.1.2 / 2014-01-24
  160. ==================
  161. * Spy automatically promotes spied method call to an expected one
  162. 1.1.1 / 2014-01-15
  163. ==================
  164. * Added support for HHVM
  165. 1.1.0 / 2014-01-01
  166. ==================
  167. * Changed the generated class names to use a static counter instead of a random number
  168. * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
  169. * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
  170. * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
  171. * Added support for properties in ObjectStateToken (thanks @adrienbrault)
  172. * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
  173. * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
  174. * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
  175. * Added StringContainToken and Argument::containingString() (thanks @peterjmit)
  176. * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty)
  177. * Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
  178. * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled``
  179. 1.0.4 / 2013-08-10
  180. ==================
  181. * Better randomness for generated class names (thanks @sstok)
  182. * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok)
  183. * Add support for old-style (method name === class name) constructors (thanks @l310 for report)
  184. 1.0.3 / 2013-07-04
  185. ==================
  186. * Support callable typehints (thanks @stof)
  187. * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli)
  188. * New ArrayEntryToken (thanks @kagux)
  189. 1.0.2 / 2013-05-19
  190. ==================
  191. * Logical `AND` token added (thanks @kagux)
  192. * Logical `NOT` token added (thanks @kagux)
  193. * Add support for setting custom constructor arguments
  194. * Properly stringify hashes
  195. * Record calls that throw exceptions
  196. * Migrate spec suite to PhpSpec 2.0
  197. 1.0.1 / 2013-04-30
  198. ==================
  199. * Fix broken UnexpectedCallException message
  200. * Trim AggregateException message
  201. 1.0.0 / 2013-04-29
  202. ==================
  203. * Improve exception messages
  204. 1.0.0-BETA2 / 2013-04-03
  205. ========================
  206. * Add more debug information to CallTimes and Call prediction exception messages
  207. * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium)
  208. * Fix some typos in the exception messages (thanks @pborreli)
  209. 1.0.0-BETA1 / 2013-03-25
  210. ========================
  211. * Initial release