File tree 3 files changed +17
-6
lines changed
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 69
69
- name : Checkout code
70
70
uses : actions/checkout@v3
71
71
72
+ - name : Remove phpspec
73
+ run : composer remove phpspec/phpspec
74
+
72
75
- name : PHPStan
73
76
uses :
OskarStark/[email protected]
74
77
env :
Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
- ## 1.2.1
3
+ ## 1.2.2 - unreleased
4
4
5
- ### Added - 2023-11-08
5
+ ### Fixed
6
+
7
+ - Changed ` Promise ` to use a template for the exception class that is allowed.
8
+
9
+ ## 1.2.1 - 2023-11-08
10
+
11
+ ### Fixed
6
12
7
13
- Fixed PHPDoc for ` wait() ` and ` then() ` 's ` onRejected ` callable
8
14
Original file line number Diff line number Diff line change 14
14
* @author Márk Sági-Kazár <[email protected] >
15
15
*
16
16
* @template-covariant T
17
+ *
18
+ * @template E of \Throwable
17
19
*/
18
20
interface Promise
19
21
{
@@ -38,10 +40,10 @@ interface Promise
38
40
* If you do not care about one of the cases, you can set the corresponding callable to null
39
41
* The callback will be called when the value arrived and never more than once.
40
42
*
41
- * @param callable(T): V|null $onFulfilled called when a response will be available
42
- * @param callable(\Throwable ): V|null $onRejected called when an exception occurs
43
+ * @param callable(T): V|null $onFulfilled called when a response will be available
44
+ * @param callable(E ): V|null $onRejected called when an exception occurs
43
45
*
44
- * @return Promise<V> a new resolved promise with value of the executed callback (onFulfilled / onRejected)
46
+ * @return Promise<V, E > a new resolved promise with value of the executed callback (onFulfilled / onRejected)
45
47
*
46
48
* @template V
47
49
*/
@@ -67,7 +69,7 @@ public function getState();
67
69
*
68
70
* @return ($unwrap is true ? T : null) Resolved value, null if $unwrap is set to false
69
71
*
70
- * @throws \Exception the rejection reason if $unwrap is set to true and the request failed
72
+ * @throws E the rejection reason if $unwrap is set to true and the request failed
71
73
*/
72
74
public function wait ($ unwrap = true );
73
75
}
You can’t perform that action at this time.
0 commit comments