From fddb6feff33c4bdfbea204a2c451417726871b9a Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 18 Jun 2024 19:25:22 +0200 Subject: [PATCH] PHP/AMPHP: Update to amphp/amp v3 by switching to `Revolt\EventLoop` After updating to `amphp/postgres 2`, amphp/php v3 became obligatory, so these updates were needed. --- by-language/php-amphp/basic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/by-language/php-amphp/basic.php b/by-language/php-amphp/basic.php index 65b9de8b..173ffeea 100644 --- a/by-language/php-amphp/basic.php +++ b/by-language/php-amphp/basic.php @@ -27,8 +27,8 @@ require __DIR__ . '/vendor/autoload.php'; -use Amp\Loop; use Amp\Postgres; +use Revolt\EventLoop; function print_header($title) @@ -58,7 +58,7 @@ function show_all_settings() print_header("Display all settings using `SHOW ALL`"); - Loop::run(function () { + EventLoop::run(function () { // Connect to CrateDB's PostgreSQL interface. $config = Postgres\ConnectionConfig::fromString($this->dsn); @@ -85,7 +85,7 @@ function ddl_dml_dql() print_header("Run DDL, DML, and DQL statements subsequently"); - Loop::run(function () { + EventLoop::run(function () { // Connect to CrateDB's PostgreSQL interface. $config = Postgres\ConnectionConfig::fromString($this->dsn); @@ -132,7 +132,7 @@ function use_pool() print_header("Using a connection pool"); - Loop::run(function () { + EventLoop::run(function () { // Connect to CrateDB's PostgreSQL interface, using a connection pool. $config = Postgres\ConnectionConfig::fromString($this->dsn);