Skip to content

Commit

Permalink
Remove deprecated createSuspension alias
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Nov 2, 2022
1 parent e6a235b commit b2671df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions src/EventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/EventLoopTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b2671df

Please sign in to comment.