From b2671dfffcdb03b957e6cadf8fe4e35208d09c65 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Wed, 2 Nov 2022 22:44:59 +0100 Subject: [PATCH] Remove deprecated createSuspension alias --- src/EventLoop.php | 15 --------------- test/EventLoopTest.php | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/EventLoop.php b/src/EventLoop.php index 79fe7cb..347f588 100644 --- a/src/EventLoop.php +++ b/src/EventLoop.php @@ -392,21 +392,6 @@ public static function getSuspension(): Suspension return self::getDriver()->getSuspension(); } - /** - * Returns an object used to suspend and resume execution of the current fiber or {main}. - * - * Calls from the same fiber will return the same suspension object. - * - * @return Suspension - * - * @deprecated This old name is only kept temporarily to allow smooth transitions from 0.1 to 0.2 and will be - * removed at a later point. - */ - public static function createSuspension(): Suspension - { - return self::getDriver()->getSuspension(); - } - /** * Run the event loop. * diff --git a/test/EventLoopTest.php b/test/EventLoopTest.php index 240daab..9420b9f 100644 --- a/test/EventLoopTest.php +++ b/test/EventLoopTest.php @@ -199,7 +199,7 @@ public function testSuspensionWithinFiber(): void public function testDoubleResumeWithinFiber(): void { - $suspension = EventLoop::createSuspension(); + $suspension = EventLoop::getSuspension(); EventLoop::queue(static function () use ($suspension): void { $suspension->resume();