From 312477a6c054e2c90a0831bc31189dabd3aefb2a Mon Sep 17 00:00:00 2001 From: tolga ulas Date: Wed, 20 Oct 2021 04:46:09 +0300 Subject: [PATCH 1/2] cancel function on interface --- src/Promise.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Promise.php b/src/Promise.php index 3258ed0..36176db 100644 --- a/src/Promise.php +++ b/src/Promise.php @@ -66,4 +66,16 @@ public function getState(); * @throws \Exception the rejection reason if $unwrap is set to true and the request failed */ public function wait($unwrap = true); + + /** + * Cancel the promise to be fulfilled or rejected. + * + * When this method returns, Attempts to cancel the promise if possible. + * The promise being cancelled and the parent most ancestor that has not yet been resolved + * will also be cancelled. Any promises waiting on the cancelled promise to resolve will + * also be cancelled. + * + * @throws \Exception the rejection reason if $unwrap is set to true and the request failed + */ + public function cancel(); } From b89a1f18ab8f6672dbe236e10b0f39fe060aae6e Mon Sep 17 00:00:00 2001 From: tolga ulas Date: Wed, 20 Oct 2021 11:29:51 +0300 Subject: [PATCH 2/2] removed cancel as it will BC --- src/Promise.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Promise.php b/src/Promise.php index 36176db..3258ed0 100644 --- a/src/Promise.php +++ b/src/Promise.php @@ -66,16 +66,4 @@ public function getState(); * @throws \Exception the rejection reason if $unwrap is set to true and the request failed */ public function wait($unwrap = true); - - /** - * Cancel the promise to be fulfilled or rejected. - * - * When this method returns, Attempts to cancel the promise if possible. - * The promise being cancelled and the parent most ancestor that has not yet been resolved - * will also be cancelled. Any promises waiting on the cancelled promise to resolve will - * also be cancelled. - * - * @throws \Exception the rejection reason if $unwrap is set to true and the request failed - */ - public function cancel(); }