diff --git a/composer.json b/composer.json index 6bb5f4b..b3c2e62 100644 --- a/composer.json +++ b/composer.json @@ -42,8 +42,7 @@ "Revolt\\": "src" }, "files": [ - "src/functions.php", - "src/EventLoop/Internal/functions.php" + "src/functions.php" ] }, "autoload-dev": { diff --git a/src/EventLoop/Internal/functions.php b/src/EventLoop/Internal/functions.php deleted file mode 100644 index 33f358c..0000000 --- a/src/EventLoop/Internal/functions.php +++ /dev/null @@ -1,21 +0,0 @@ - throw $exception); - } -} diff --git a/test/EventLoopTest.php b/test/EventLoopTest.php index 71c4f18..1a353fd 100644 --- a/test/EventLoopTest.php +++ b/test/EventLoopTest.php @@ -4,7 +4,6 @@ use PHPUnit\Framework\TestCase; use Revolt\EventLoop; -use function Revolt\launch; class EventLoopTest extends TestCase { @@ -106,7 +105,7 @@ public function testFiberReuse(): void public function testRunInFiber(): void { - launch(fn () => EventLoop::run()); + EventLoop::queue(fn () => EventLoop::run()); $this->expectException(\Error::class); $this->expectExceptionMessage("within a fiber"); @@ -154,7 +153,7 @@ public function testSuspensionWithinFiber(): void { $invoked = false; - launch(function () use (&$invoked): void { + EventLoop::queue(function () use (&$invoked): void { $suspension = EventLoop::createSuspension(); EventLoop::defer(fn () => $suspension->resume('test'));