Skip to content

Commit b2671df

Browse files
committed
Remove deprecated createSuspension alias
1 parent e6a235b commit b2671df

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

src/EventLoop.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -392,21 +392,6 @@ public static function getSuspension(): Suspension
392392
return self::getDriver()->getSuspension();
393393
}
394394

395-
/**
396-
* Returns an object used to suspend and resume execution of the current fiber or {main}.
397-
*
398-
* Calls from the same fiber will return the same suspension object.
399-
*
400-
* @return Suspension
401-
*
402-
* @deprecated This old name is only kept temporarily to allow smooth transitions from 0.1 to 0.2 and will be
403-
* removed at a later point.
404-
*/
405-
public static function createSuspension(): Suspension
406-
{
407-
return self::getDriver()->getSuspension();
408-
}
409-
410395
/**
411396
* Run the event loop.
412397
*

test/EventLoopTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function testSuspensionWithinFiber(): void
199199

200200
public function testDoubleResumeWithinFiber(): void
201201
{
202-
$suspension = EventLoop::createSuspension();
202+
$suspension = EventLoop::getSuspension();
203203

204204
EventLoop::queue(static function () use ($suspension): void {
205205
$suspension->resume();

0 commit comments

Comments
 (0)