From 9d9c10c963175138b8923a7b24d731726d0984d0 Mon Sep 17 00:00:00 2001 From: Benoit Viguier Date: Mon, 19 Apr 2021 16:07:09 +0200 Subject: [PATCH] fix(examples): Incomplete namespace in examples --- examples/00-README-samples.php | 2 +- examples/01-async-countdown.php | 2 +- examples/02-failures.php | 2 +- examples/03-http-client.php | 2 +- examples/04-foreach.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/00-README-samples.php b/examples/00-README-samples.php index 2b96a63..b4ce332 100755 --- a/examples/00-README-samples.php +++ b/examples/00-README-samples.php @@ -100,7 +100,7 @@ function waitException(Tornado\EventLoop $eventLoop) $eventLoop = new Tornado\Adapter\Tornado\EventLoop(); //$eventLoop = new Tornado\Adapter\Tornado\SynchronousEventLoop(); //$eventLoop = new Tornado\Adapter\Amp\EventLoop(); -//$eventLoop = new Tornado\Adapter\ReactPhp\EventLoop(new React\EventLoop\StreamSelectLoop()); +//$eventLoop = new Tornado\Adapter\ReactPhp\EventLoop(new \React\EventLoop\StreamSelectLoop()); // Tornado provides only one HttpClient implementation, using Guzzle $httpClient = new Tornado\Adapter\Guzzle\HttpClient($eventLoop, new Tornado\Adapter\Guzzle\CurlMultiClientWrapper()); diff --git a/examples/01-async-countdown.php b/examples/01-async-countdown.php index 225b0ed..e8e6a17 100755 --- a/examples/01-async-countdown.php +++ b/examples/01-async-countdown.php @@ -26,7 +26,7 @@ function asynchronousCountdown(EventLoop $eventLoop, string $name, int $count): $eventLoop = new Adapter\Tornado\EventLoop(); //$eventLoop = new Adapter\Tornado\SynchronousEventLoop(); //$eventLoop = new Adapter\Amp\EventLoop(); -//$eventLoop = new Adapter\ReactPhp\EventLoop(new React\EventLoop\StreamSelectLoop()); +//$eventLoop = new Adapter\ReactPhp\EventLoop(new \React\EventLoop\StreamSelectLoop()); echo "Let's start!\n"; diff --git a/examples/02-failures.php b/examples/02-failures.php index 56dcf79..84778de 100755 --- a/examples/02-failures.php +++ b/examples/02-failures.php @@ -18,7 +18,7 @@ function throwingGenerator(): \Generator $eventLoop = new Adapter\Tornado\EventLoop(); //$eventLoop = new Adapter\Tornado\SynchronousEventLoop(); //$eventLoop = new Adapter\Amp\EventLoop(); -//$eventLoop = new Adapter\ReactPhp\EventLoop(new React\EventLoop\StreamSelectLoop()); +//$eventLoop = new Adapter\ReactPhp\EventLoop(new \React\EventLoop\StreamSelectLoop()); echo "Let's start!\n"; diff --git a/examples/03-http-client.php b/examples/03-http-client.php index 0e5a561..485eb48 100755 --- a/examples/03-http-client.php +++ b/examples/03-http-client.php @@ -26,7 +26,7 @@ function monitorRequest(EventLoop $eventLoop, HttpClient $httpClient, string $ur $eventLoop = new Adapter\Tornado\EventLoop(); //$eventLoop = new Adapter\Tornado\SynchronousEventLoop(); //$eventLoop = new Adapter\Amp\EventLoop(); -//$eventLoop = new Adapter\ReactPhp\EventLoop(new React\EventLoop\StreamSelectLoop()); +//$eventLoop = new Adapter\ReactPhp\EventLoop(new \React\EventLoop\StreamSelectLoop()); // Choose your adapter $httpClient = new Adapter\Symfony\HttpClient(new \Symfony\Component\HttpClient\CurlHttpClient(), $eventLoop, new \Http\Factory\Guzzle\ResponseFactory(), new \Http\Factory\Guzzle\StreamFactory()); diff --git a/examples/04-foreach.php b/examples/04-foreach.php index 09f7b75..cf0a437 100755 --- a/examples/04-foreach.php +++ b/examples/04-foreach.php @@ -69,7 +69,7 @@ function compareMethods(EventLoop $eventLoop) $eventLoop = new Adapter\Tornado\EventLoop(); //$eventLoop = new Adapter\Tornado\SynchronousEventLoop(); //$eventLoop = new Adapter\Amp\EventLoop(); -//$eventLoop = new Adapter\ReactPhp\EventLoop(new React\EventLoop\StreamSelectLoop()); +//$eventLoop = new Adapter\ReactPhp\EventLoop(new \React\EventLoop\StreamSelectLoop()); echo "Let's start!\n"; // Run the event loop until our goal promise is reached.