Skip to content

Commit fddb6fe

Browse files
committed
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.
1 parent 6238987 commit fddb6fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

by-language/php-amphp/basic.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
require __DIR__ . '/vendor/autoload.php';
2929

30-
use Amp\Loop;
3130
use Amp\Postgres;
31+
use Revolt\EventLoop;
3232

3333

3434
function print_header($title)
@@ -58,7 +58,7 @@ function show_all_settings()
5858

5959
print_header("Display all settings using `SHOW ALL`");
6060

61-
Loop::run(function () {
61+
EventLoop::run(function () {
6262

6363
// Connect to CrateDB's PostgreSQL interface.
6464
$config = Postgres\ConnectionConfig::fromString($this->dsn);
@@ -85,7 +85,7 @@ function ddl_dml_dql()
8585

8686
print_header("Run DDL, DML, and DQL statements subsequently");
8787

88-
Loop::run(function () {
88+
EventLoop::run(function () {
8989

9090
// Connect to CrateDB's PostgreSQL interface.
9191
$config = Postgres\ConnectionConfig::fromString($this->dsn);
@@ -132,7 +132,7 @@ function use_pool()
132132

133133
print_header("Using a connection pool");
134134

135-
Loop::run(function () {
135+
EventLoop::run(function () {
136136

137137
// Connect to CrateDB's PostgreSQL interface, using a connection pool.
138138
$config = Postgres\ConnectionConfig::fromString($this->dsn);

0 commit comments

Comments
 (0)