File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 28
28
"require" : {
29
29
"php" : " >=7.1" ,
30
30
"react/event-loop" : " ^1.2" ,
31
- "react/promise" : " ^ 3.0 || ^2.8 || ^1.2.1 "
31
+ "react/promise" : " dev-report-unhandled as 3.0.0 "
32
32
},
33
33
"require-dev" : {
34
34
"phpstan/phpstan" : " 1.10.18 || 1.4.10" ,
41
41
},
42
42
"autoload-dev" : {
43
43
"psr-4" : { "React\\ Tests\\ Async\\ " : " tests/" }
44
+ },
45
+ "repositories" : {
46
+ "clue" : {
47
+ "type" : " vcs" ,
48
+ "url" : " https://github.com/clue-labs/promise"
49
+ }
44
50
}
45
51
}
Original file line number Diff line number Diff line change @@ -193,6 +193,8 @@ public function testCoroutineShouldNotCreateAnyGarbageReferencesForPromiseReject
193
193
});
194
194
});
195
195
196
+ $ promise ->then (null , $ this ->expectCallableOnce ()); // avoid reporting unhandled rejection
197
+
196
198
unset($ promise );
197
199
198
200
$ this ->assertEquals (0 , gc_collect_cycles ());
@@ -232,6 +234,8 @@ public function testCoroutineShouldNotCreateAnyGarbageReferencesWhenGeneratorThr
232
234
yield ; // @phpstan-ignore-line
233
235
});
234
236
237
+ $ promise ->then (null , $ this ->expectCallableOnce ()); // avoid reporting unhandled rejection
238
+
235
239
unset($ promise );
236
240
237
241
$ this ->assertEquals (0 , gc_collect_cycles ());
@@ -249,6 +253,8 @@ public function testCoroutineShouldNotCreateAnyGarbageReferencesWhenGeneratorYie
249
253
yield 42 ;
250
254
});
251
255
256
+ $ promise ->then (null , $ this ->expectCallableOnce ()); // avoid reporting unhandled rejection
257
+
252
258
unset($ promise );
253
259
254
260
$ this ->assertEquals (0 , gc_collect_cycles ());
You can’t perform that action at this time.
0 commit comments