| 148 |
lars |
1 |
# Change Log
|
|
|
2 |
|
|
|
3 |
## 1.3.6 (2022-09-07)
|
|
|
4 |
* PHP 8.2 | Fix "Use of "parent" in callables is deprecated" notice #1169
|
|
|
5 |
|
|
|
6 |
## 1.5.1 (2022-09-07)
|
|
|
7 |
|
|
|
8 |
* [PHP 8.2] Various tests: explicitly declare properties #1170
|
|
|
9 |
* [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169
|
|
|
10 |
* [PHP 8.1] Support intersection types #1164
|
|
|
11 |
* Handle final `__toString` methods #1162
|
|
|
12 |
|
|
|
13 |
## 1.5.0 (2022-01-20)
|
|
|
14 |
|
|
|
15 |
* Override default call count expectations via expects() #1146
|
|
|
16 |
* Mock methods with static return types #1157
|
|
|
17 |
* Mock methods with mixed return type #1156
|
|
|
18 |
* Mock classes with new in initializers on PHP 8.1 #1160
|
|
|
19 |
* Removes redundant PHPUnitConstraint #1158
|
|
|
20 |
|
|
|
21 |
## 1.4.4 (2021-09-13)
|
|
|
22 |
|
|
|
23 |
* Fixes auto-generated return values #1144
|
|
|
24 |
* Adds support for tentative types #1130
|
|
|
25 |
* Fixes for PHP 8.1 Support (#1130 and #1140)
|
|
|
26 |
* Add method that allows defining a set of arguments the mock should yield #1133
|
|
|
27 |
* Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120
|
|
|
28 |
|
|
|
29 |
## 1.3.5 (2021-09-13)
|
|
|
30 |
* Fix auto-generated return values with union types #1143
|
|
|
31 |
* Adds support for tentative types #1130
|
|
|
32 |
* Fixes for PHP 8.1 Support (#1130 and #1140)
|
|
|
33 |
* Add method that allows defining a set of arguments the mock should yield #1133
|
|
|
34 |
* Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120
|
|
|
35 |
|
|
|
36 |
## 1.4.3 (2021-02-24)
|
|
|
37 |
|
|
|
38 |
* Fixes calls to fetchMock before initialisation #1113
|
|
|
39 |
* Allow shouldIgnoreMissing() to behave in a recursive fashion #1097
|
|
|
40 |
* Custom object formatters #766 (Needs Docs)
|
|
|
41 |
* Fix crash on a union type including null #1106
|
|
|
42 |
|
|
|
43 |
## 1.3.4 (2021-02-24)
|
|
|
44 |
|
|
|
45 |
* Fixes calls to fetchMock before initialisation #1113
|
|
|
46 |
* Fix crash on a union type including null #1106
|
|
|
47 |
|
|
|
48 |
## 1.4.2 (2020-08-11)
|
|
|
49 |
|
|
|
50 |
* Fix array to string conversion in ConstantsPass (#1086)
|
|
|
51 |
* Fixed nullable PHP 8.0 union types (#1088, #1089)
|
|
|
52 |
* Fixed support for PHP 8.0 parent type (#1088, #1089)
|
|
|
53 |
* Fixed PHP 8.0 mixed type support (#1088, #1089)
|
|
|
54 |
* Fixed PHP 8.0 union return types (#1088, #1089)
|
|
|
55 |
|
|
|
56 |
## 1.4.1 (2020-07-09)
|
|
|
57 |
|
|
|
58 |
* Allow quick definitions to use 'at least once' expectation
|
|
|
59 |
`\Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true)` (#1056)
|
|
|
60 |
* Added provisional support for PHP 8.0 (#1068, #1072,#1079)
|
|
|
61 |
* Fix mocking methods with iterable return type without specifying a return value (#1075)
|
|
|
62 |
|
|
|
63 |
## 1.3.3 (2020-08-11)
|
|
|
64 |
|
|
|
65 |
* Fix array to string conversion in ConstantsPass (#1086)
|
|
|
66 |
* Fixed nullable PHP 8.0 union types (#1088)
|
|
|
67 |
* Fixed support for PHP 8.0 parent type (#1088)
|
|
|
68 |
* Fixed PHP 8.0 mixed type support (#1088)
|
|
|
69 |
* Fixed PHP 8.0 union return types (#1088)
|
|
|
70 |
|
|
|
71 |
## 1.3.2 (2020-07-09)
|
|
|
72 |
|
|
|
73 |
* Fix mocking with anonymous classes (#1039)
|
|
|
74 |
* Fix andAnyOthers() to properly match earlier expectations (#1051)
|
|
|
75 |
* Added provisional support for PHP 8.0 (#1068, #1072,#1079)
|
|
|
76 |
* Fix mocking methods with iterable return type without specifying a return value (#1075)
|
|
|
77 |
|
|
|
78 |
## 1.4.0 (2020-05-19)
|
|
|
79 |
|
|
|
80 |
* Fix mocking with anonymous classes (#1039)
|
|
|
81 |
* Fix andAnyOthers() to properly match earlier expectations (#1051)
|
|
|
82 |
* Drops support for PHP < 7.3 and PHPUnit < 8 (#1059)
|
|
|
83 |
|
|
|
84 |
## 1.3.1 (2019-12-26)
|
|
|
85 |
|
|
|
86 |
* Revert improved exception debugging due to BC breaks (#1032)
|
|
|
87 |
|
|
|
88 |
## 1.3.0 (2019-11-24)
|
|
|
89 |
|
|
|
90 |
* Added capture `Mockery::capture` convenience matcher (#1020)
|
|
|
91 |
* Added `andReturnArg` to echo back an argument passed to a an expectation (#992)
|
|
|
92 |
* Improved exception debugging (#1000)
|
|
|
93 |
* Fixed `andSet` to not reuse properties between mock objects (#1012)
|
|
|
94 |
|
|
|
95 |
## 1.2.4 (2019-09-30)
|
|
|
96 |
|
|
|
97 |
* Fix a bug introduced with previous release, for empty method definition lists (#1009)
|
|
|
98 |
|
|
|
99 |
## 1.2.3 (2019-08-07)
|
|
|
100 |
|
|
|
101 |
* Allow mocking classes that have allows and expects methods (#868)
|
|
|
102 |
* Allow passing thru __call method in all mock types (experimental) (#969)
|
|
|
103 |
* Add support for `!` to blacklist methods (#959)
|
|
|
104 |
* Added `withSomeOfArgs` to partial match a list of args (#967)
|
|
|
105 |
* Fix chained demeter calls with type hint (#956)
|
|
|
106 |
|
|
|
107 |
## 1.2.2 (2019-02-13)
|
|
|
108 |
|
|
|
109 |
* Fix a BC breaking change for PHP 5.6/PHPUnit 5.7.27 (#947)
|
|
|
110 |
|
|
|
111 |
## 1.2.1 (2019-02-07)
|
|
|
112 |
|
|
|
113 |
* Support for PHPUnit 8 (#942)
|
|
|
114 |
* Allow mocking static methods called on instance (#938)
|
|
|
115 |
|
|
|
116 |
## 1.2.0 (2018-10-02)
|
|
|
117 |
|
|
|
118 |
* Starts counting default expectations towards count (#910)
|
|
|
119 |
* Adds workaround for some HHVM return types (#909)
|
|
|
120 |
* Adds PhpStorm metadata support for autocomplete etc (#904)
|
|
|
121 |
* Further attempts to support multiple PHPUnit versions (#903)
|
|
|
122 |
* Allows setting constructor expectations on instance mocks (#900)
|
|
|
123 |
* Adds workaround for HHVM memoization decorator (#893)
|
|
|
124 |
* Adds experimental support for callable spys (#712)
|
|
|
125 |
|
|
|
126 |
## 1.1.0 (2018-05-08)
|
|
|
127 |
|
|
|
128 |
* Allows use of string method names in allows and expects (#794)
|
|
|
129 |
* Finalises allows and expects syntax in API (#799)
|
|
|
130 |
* Search for handlers in a case instensitive way (#801)
|
|
|
131 |
* Deprecate allowMockingMethodsUnnecessarily (#808)
|
|
|
132 |
* Fix risky tests (#769)
|
|
|
133 |
* Fix namespace in TestListener (#812)
|
|
|
134 |
* Fixed conflicting mock names (#813)
|
|
|
135 |
* Clean elses (#819)
|
|
|
136 |
* Updated protected method mocking exception message (#826)
|
|
|
137 |
* Map of constants to mock (#829)
|
|
|
138 |
* Simplify foreach with `in_array` function (#830)
|
|
|
139 |
* Typehinted return value on Expectation#verify. (#832)
|
|
|
140 |
* Fix shouldNotHaveReceived with HigherOrderMessage (#842)
|
|
|
141 |
* Deprecates shouldDeferMissing (#839)
|
|
|
142 |
* Adds support for return type hints in Demeter chains (#848)
|
|
|
143 |
* Adds shouldNotReceive to composite expectation (#847)
|
|
|
144 |
* Fix internal error when using --static-backup (#845)
|
|
|
145 |
* Adds `andAnyOtherArgs` as an optional argument matcher (#860)
|
|
|
146 |
* Fixes namespace qualifying with namespaced named mocks (#872)
|
|
|
147 |
* Added possibility to add Constructor-Expections on hard dependencies, read: Mockery::mock('overload:...') (#781)
|
|
|
148 |
|
|
|
149 |
## 1.0.0 (2017-09-06)
|
|
|
150 |
|
|
|
151 |
* Destructors (`__destruct`) are stubbed out where it makes sense
|
|
|
152 |
* Allow passing a closure argument to `withArgs()` to validate multiple arguments at once.
|
|
|
153 |
* `Mockery\Adapter\Phpunit\TestListener` has been rewritten because it
|
|
|
154 |
incorrectly marked some tests as risky. It will no longer verify mock
|
|
|
155 |
expectations but instead check that tests do that themselves. PHPUnit 6 is
|
|
|
156 |
required if you want to use this fail safe.
|
|
|
157 |
* Removes SPL Class Loader
|
|
|
158 |
* Removed object recorder feature
|
|
|
159 |
* Bumped minimum PHP version to 5.6
|
|
|
160 |
* `andThrow` will now throw anything `\Throwable`
|
|
|
161 |
* Adds `allows` and `expects` syntax
|
|
|
162 |
* Adds optional global helpers for `mock`, `namedMock` and `spy`
|
|
|
163 |
* Adds ability to create objects using traits
|
|
|
164 |
* `Mockery\Matcher\MustBe` was deprecated
|
|
|
165 |
* Marked `Mockery\MockInterface` as internal
|
|
|
166 |
* Subset matcher matches recursively
|
|
|
167 |
* BC BREAK - Spies return `null` by default from ignored (non-mocked) methods with nullable return type
|
|
|
168 |
* Removed extracting getter methods of object instances
|
|
|
169 |
* BC BREAK - Remove implicit regex matching when trying to match string arguments, introduce `\Mockery::pattern()` when regex matching is needed
|
|
|
170 |
* Fix Mockery not getting closed in cases of failing test cases
|
|
|
171 |
* Fix Mockery not setting properties on overloaded instance mocks
|
|
|
172 |
* BC BREAK - Fix Mockery not trying default expectations if there is any concrete expectation
|
|
|
173 |
* BC BREAK - Mockery's PHPUnit integration will mark a test as risky if it
|
|
|
174 |
thinks one it's exceptions has been swallowed in PHPUnit > 5.7.6. Use `$e->dismiss()` to dismiss.
|
|
|
175 |
|
|
|
176 |
## 0.9.4 (XXXX-XX-XX)
|
|
|
177 |
|
|
|
178 |
* `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods`
|
|
|
179 |
config
|
|
|
180 |
* Some support for variadic parameters
|
|
|
181 |
* Hamcrest is now a required dependency
|
|
|
182 |
* Instance mocks now respect `shouldIgnoreMissing` call on control instance
|
|
|
183 |
* This will be the *last version to support PHP 5.3*
|
|
|
184 |
* Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait
|
|
|
185 |
* Added `makePartial` to `Mockery\MockInterface` as it was missing
|
|
|
186 |
|
|
|
187 |
## 0.9.3 (2014-12-22)
|
|
|
188 |
|
|
|
189 |
* Added a basic spy implementation
|
|
|
190 |
* Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit
|
|
|
191 |
integration
|
|
|
192 |
|
|
|
193 |
## 0.9.2 (2014-09-03)
|
|
|
194 |
|
|
|
195 |
* Some workarounds for the serialisation problems created by changes to PHP in 5.5.13, 5.4.29,
|
|
|
196 |
5.6.
|
|
|
197 |
* Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and
|
|
|
198 |
foo->baz, we'll attempt to use the same foo
|
|
|
199 |
|
|
|
200 |
## 0.9.1 (2014-05-02)
|
|
|
201 |
|
|
|
202 |
* Allow specifying consecutive exceptions to be thrown with `andThrowExceptions`
|
|
|
203 |
* Allow specifying methods which can be mocked when using
|
|
|
204 |
`Mockery\Configuration::allowMockingNonExistentMethods(false)` with
|
|
|
205 |
`Mockery\MockInterface::shouldAllowMockingMethod($methodName)`
|
|
|
206 |
* Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()`
|
|
|
207 |
* `shouldIgnoreMissing` now takes an optional value that will be return instead
|
|
|
208 |
of null, e.g. `$mock->shouldIgnoreMissing($mock)`
|
|
|
209 |
|
|
|
210 |
## 0.9.0 (2014-02-05)
|
|
|
211 |
|
|
|
212 |
* Allow mocking classes with final __wakeup() method
|
|
|
213 |
* Quick definitions are now always `byDefault`
|
|
|
214 |
* Allow mocking of protected methods with `shouldAllowMockingProtectedMethods`
|
|
|
215 |
* Support official Hamcrest package
|
|
|
216 |
* Generator completely rewritten
|
|
|
217 |
* Easily create named mocks with namedMock
|