From d497ef3297c3966e42494f03906d9266421cf8f4 Mon Sep 17 00:00:00 2001 From: walkor Date: Fri, 22 Nov 2024 09:06:54 +0800 Subject: [PATCH 1/7] Remove pgsql tests for swoole and swow --- .../PHP/workerman/benchmark_config.json | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/frameworks/PHP/workerman/benchmark_config.json b/frameworks/PHP/workerman/benchmark_config.json index a2077767b43..8e79f1b124c 100644 --- a/frameworks/PHP/workerman/benchmark_config.json +++ b/frameworks/PHP/workerman/benchmark_config.json @@ -108,28 +108,6 @@ "notes": "", "versus": "php" }, - "pgsql-swow": { - "dockerfile": "workerman-pgsql-swow-jit.dockerfile", - "db_url": "/db", - "query_url": "/query?q=", - "update_url": "/update?q=", - "fortune_url": "/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "Postgres", - "framework": "workerman", - "language": "PHP", - "flavor": "PHP8", - "orm": "Raw", - "platform": "workerman", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "workerman [jit, pgsql, swow, async]", - "notes": "", - "versus": "php" - }, "mysql-swow": { "dockerfile": "workerman-mysql-swow-jit.dockerfile", "db_url": "/db", @@ -152,28 +130,6 @@ "notes": "", "versus": "php" }, - "pgsql-swoole": { - "dockerfile": "workerman-pgsql-swoole-jit.dockerfile", - "db_url": "/db", - "query_url": "/query?q=", - "update_url": "/update?q=", - "fortune_url": "/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "Postgres", - "framework": "workerman", - "language": "PHP", - "flavor": "PHP8", - "orm": "Raw", - "platform": "workerman", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "workerman [jit, pgsql, swoole, async]", - "notes": "", - "versus": "php" - }, "mysql-swoole": { "dockerfile": "workerman-mysql-swoole-jit.dockerfile", "db_url": "/db", From c57946c9cdb705b3f69e8476c98d30f2b411970e Mon Sep 17 00:00:00 2001 From: walkor Date: Fri, 22 Nov 2024 09:36:09 +0800 Subject: [PATCH 2/7] Code optimization --- frameworks/PHP/workerman/Mysql.php | 16 ++----- frameworks/PHP/workerman/MysqlSwoole.php | 16 ++----- frameworks/PHP/workerman/Pgsql.php | 42 ++++++------------- frameworks/PHP/workerman/PgsqlSwoole.php | 8 +--- frameworks/PHP/workerman/server.php | 14 +++---- .../PHP/workerman/workerman-jit.dockerfile | 1 + .../workerman/workerman-mysql-jit.dockerfile | 1 + .../workerman-mysql-swoole-jit.dockerfile | 1 + .../workerman-mysql-swow-jit.dockerfile | 1 + .../workerman/workerman-pgsql-jit.dockerfile | 1 + .../workerman-pgsql-swoole-jit.dockerfile | 1 + .../workerman-pgsql-swow-jit.dockerfile | 1 + .../PHP/workerman/workerman-pgsql.dockerfile | 1 + frameworks/PHP/workerman/workerman.dockerfile | 1 + 14 files changed, 39 insertions(+), 66 deletions(-) diff --git a/frameworks/PHP/workerman/Mysql.php b/frameworks/PHP/workerman/Mysql.php index 9c1cdcf0a53..c8dcd0ff40a 100644 --- a/frameworks/PHP/workerman/Mysql.php +++ b/frameworks/PHP/workerman/Mysql.php @@ -32,13 +32,9 @@ function db(): array function query($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); - } + $count = min(max((int) $request->get('q'), 1), 500); $arr = []; - while ($query_count--) { + while ($count--) { $this->world->execute([mt_rand(1, 10000)]); $arr[] = $this->world->fetch(); } @@ -47,13 +43,9 @@ function query($request): array function update($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); - } + $count = min(max((int) $request->get('q'), 1), 500); $arr = []; - while ($query_count--) { + while ($count--) { $id = mt_rand(1, 10000); $this->world->execute([$id]); $item = $this->world->fetch(); diff --git a/frameworks/PHP/workerman/MysqlSwoole.php b/frameworks/PHP/workerman/MysqlSwoole.php index ff290648fa1..d294afae62d 100644 --- a/frameworks/PHP/workerman/MysqlSwoole.php +++ b/frameworks/PHP/workerman/MysqlSwoole.php @@ -31,15 +31,11 @@ function db(): array function query($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); - } + $count = min(max((int) $request->get('q'), 1), 500); $pdo = $this->pool->get(); $stmt = $pdo->prepare('SELECT id,randomNumber FROM World WHERE id=?'); $arr = []; - while ($query_count--) { + while ($count--) { $stmt->execute([mt_rand(1, 10000)]); $arr[] = $stmt->fetch(PDO::FETCH_ASSOC); } @@ -49,16 +45,12 @@ function query($request): array function update($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); - } + $count = min(max((int) $request->get('q'), 1), 500); $arr = []; $pdo = $this->pool->get(); $world = $pdo->prepare('SELECT id,randomNumber FROM World WHERE id=?'); $update = $pdo->prepare('UPDATE World SET randomNumber=? WHERE id=?'); - while ($query_count--) { + while ($count--) { $id = mt_rand(1, 10000); $world->execute([$id]); $item = $world->fetch(PDO::FETCH_ASSOC); diff --git a/frameworks/PHP/workerman/Pgsql.php b/frameworks/PHP/workerman/Pgsql.php index f86dc6364af..4f4be58fe44 100644 --- a/frameworks/PHP/workerman/Pgsql.php +++ b/frameworks/PHP/workerman/Pgsql.php @@ -28,37 +28,21 @@ public function __construct() function update($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); + $queries = $request->get('q'); + $worlds = $keys = $values = []; + $count = min(max((int) $queries, 1), 500); + for ($i = 0; $i < $count; ++ $i) { + $values[] = $keys[] = $id = mt_rand(1, 10000); + $this->random->execute([$id]); + $row = $this->random->fetch(); + $values[] = $row['randomNumber'] = mt_rand(1, 10000); + $worlds[] = $row; } - $worlds = []; - while ($query_count--) { - $this->random->execute([\mt_rand(1, 10000)]); - $world = $this->random->fetch(); - $world['randomNumber'] = \mt_rand(1, 10000); - $worlds[] = $world; + if (!isset($this->updates[$count])) { + $sql = 'UPDATE World SET randomNumber = CASE id' . str_repeat(' WHEN ?::INTEGER THEN ?::INTEGER ', $count) . 'END WHERE id IN (' . str_repeat('?::INTEGER,', $count - 1) . '?::INTEGER)'; + $this->updates[$count] = $this->pdo->prepare($sql); } - $rows = count($worlds); - - if (!isset($this->updates[$rows])) { - $sql = 'UPDATE world SET randomNumber = CASE id' - . str_repeat(' WHEN ?::INTEGER THEN ?::INTEGER ', $rows) - . 'END WHERE id IN (' - . str_repeat('?::INTEGER,', $rows - 1) . '?::INTEGER)'; - - $this->updates[$rows] = $this->pdo->prepare($sql); - } - - $val = []; - $keys = []; - foreach ($worlds as $world) { - $val[] = $keys[] = $world['id']; - $val[] = $world['randomNumber']; - } - - $this->updates[$rows]->execute([...$val, ...$keys]); + $this->updates[$count]->execute([...$values, ...$keys]); return $worlds; } diff --git a/frameworks/PHP/workerman/PgsqlSwoole.php b/frameworks/PHP/workerman/PgsqlSwoole.php index 1a999aac982..0a8b99dfc18 100644 --- a/frameworks/PHP/workerman/PgsqlSwoole.php +++ b/frameworks/PHP/workerman/PgsqlSwoole.php @@ -23,15 +23,11 @@ public function __construct($size) function update($request): array { - $query_count = 1; - $q = (int)$request->get('q'); - if ($q > 1) { - $query_count = min($q, 500); - } + $count = min(max((int) $request->get('q'), 1), 500); $worlds = []; $pdo = $this->pool->get(); $random = $pdo->prepare('SELECT id,randomNumber FROM World WHERE id=?'); - while ($query_count--) { + while ($count--) { $random->execute([mt_rand(1, 10000)]); $world = $random->fetch(PDO::FETCH_ASSOC); $world['randomNumber'] = mt_rand(1, 10000); diff --git a/frameworks/PHP/workerman/server.php b/frameworks/PHP/workerman/server.php index a8499e4f538..8f845329bf2 100644 --- a/frameworks/PHP/workerman/server.php +++ b/frameworks/PHP/workerman/server.php @@ -1,6 +1,7 @@ reusePort = true; +$http_worker->reusePort = true; $http_worker->count = $process_count; $http_worker->onWorkerStart = static function () use ($test_type, $pool_size, &$db, &$date) { $db = match ($test_type) { @@ -28,12 +30,10 @@ }; $date = new Date(); }; -if ($test_type === 'default') { - Worker::$eventLoopClass = Select::class; -} elseif (in_array($test_type, ['pgsql-swow', 'mysql-swow'])) { - Worker::$eventLoopClass = Swow::class; -} elseif (in_array($test_type, ['pgsql-swoole', 'mysql-swoole'])) { - Worker::$eventLoopClass = Swoole::class; + +Worker::$eventLoopClass = "Workerman\\Events\\$event_loop"; +if ($event_loop === 'Swoole') { + Coroutine::set(['hook_flags' => SWOOLE_HOOK_ALL]); } $http_worker->onMessage = static function ($connection, $request) use (&$db, &$date) { diff --git a/frameworks/PHP/workerman/workerman-jit.dockerfile b/frameworks/PHP/workerman/workerman-jit.dockerfile index 6ff432c60b8..489b496750a 100644 --- a/frameworks/PHP/workerman/workerman-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-jit.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE default ENV PROCESS_MULTIPLIER 1 +ENV EVENT_LOOP Select ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile b/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile index 33ad3879954..95271c59d37 100644 --- a/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE mysql ENV PROCESS_MULTIPLIER 4 +ENV EVENT_LOOP Event ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-mysql-swoole-jit.dockerfile b/frameworks/PHP/workerman/workerman-mysql-swoole-jit.dockerfile index eb88aae9c88..54440a5a047 100644 --- a/frameworks/PHP/workerman/workerman-mysql-swoole-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-mysql-swoole-jit.dockerfile @@ -4,6 +4,7 @@ ENV TEST_TYPE mysql-swoole ENV SWOOLE_VERSION 5.1.5 ENV PROCESS_MULTIPLIER 1 ENV POOL_SIZE 4 +ENV EVENT_LOOP Swoole ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-mysql-swow-jit.dockerfile b/frameworks/PHP/workerman/workerman-mysql-swow-jit.dockerfile index 2e3e571dbce..ffab87c078d 100644 --- a/frameworks/PHP/workerman/workerman-mysql-swow-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-mysql-swow-jit.dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE mysql-swow ENV PROCESS_MULTIPLIER 1 ENV POOL_SIZE 4 +ENV EVENT_LOOP Swow ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile b/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile index dcd2ce482e9..aaee452d7e8 100644 --- a/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE pgsql ENV PROCESS_MULTIPLIER 4 +ENV EVENT_LOOP Event ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-pgsql-swoole-jit.dockerfile b/frameworks/PHP/workerman/workerman-pgsql-swoole-jit.dockerfile index fbc563d68f9..09a6026a853 100644 --- a/frameworks/PHP/workerman/workerman-pgsql-swoole-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql-swoole-jit.dockerfile @@ -4,6 +4,7 @@ ENV TEST_TYPE pgsql-swoole ENV SWOOLE_VERSION 5.1.5 ENV PROCESS_MULTIPLIER 2 ENV POOL_SIZE 16 +ENV EVENT_LOOP Swoole ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-pgsql-swow-jit.dockerfile b/frameworks/PHP/workerman/workerman-pgsql-swow-jit.dockerfile index d58d7b4865d..72557d22306 100644 --- a/frameworks/PHP/workerman/workerman-pgsql-swow-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql-swow-jit.dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE pgsql-swow ENV PROCESS_MULTIPLIER 2 ENV POOL_SIZE 16 +ENV EVENT_LOOP Swow ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman-pgsql.dockerfile b/frameworks/PHP/workerman/workerman-pgsql.dockerfile index fc12352dd8f..54e6d834c66 100644 --- a/frameworks/PHP/workerman/workerman-pgsql.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE pgsql ENV PROCESS_MULTIPLIER 4 +ENV EVENT_LOOP Event ARG DEBIAN_FRONTEND=noninteractive diff --git a/frameworks/PHP/workerman/workerman.dockerfile b/frameworks/PHP/workerman/workerman.dockerfile index 6cff7987f3a..8e8a6182d99 100644 --- a/frameworks/PHP/workerman/workerman.dockerfile +++ b/frameworks/PHP/workerman/workerman.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:24.04 ENV TEST_TYPE default ENV PROCESS_MULTIPLIER 1 +ENV EVENT_LOOP Select ARG DEBIAN_FRONTEND=noninteractive From 9ed5f00308aff9a4c8e176b0c0fbe8e37a9ee781 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Fri, 22 Nov 2024 10:45:54 +0100 Subject: [PATCH 3/7] Update workerman.dockerfile to PHP/8. --- frameworks/PHP/workerman/workerman.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/PHP/workerman/workerman.dockerfile b/frameworks/PHP/workerman/workerman.dockerfile index 8e8a6182d99..8d93101166f 100644 --- a/frameworks/PHP/workerman/workerman.dockerfile +++ b/frameworks/PHP/workerman/workerman.dockerfile @@ -10,18 +10,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.3-cli php8.3-mysql php8.3-xml > /dev/null +RUN apt-get install -yqq php8.4-cli php8.4-mysql php8.4-xml > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null && \ - pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini WORKDIR /workerman COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -COPY php.ini /etc/php/8.3/cli/php.ini +COPY php.ini /etc/php/8.4/cli/php.ini EXPOSE 8080 From c553b6694304fdfd64dec442116bbc135409d94e Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Fri, 22 Nov 2024 10:47:46 +0100 Subject: [PATCH 4/7] Update workerman-jit.dockerfile to PHP/8.4 --- frameworks/PHP/workerman/workerman-jit.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/PHP/workerman/workerman-jit.dockerfile b/frameworks/PHP/workerman/workerman-jit.dockerfile index 489b496750a..47ae11800d2 100644 --- a/frameworks/PHP/workerman/workerman-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-jit.dockerfile @@ -10,18 +10,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.3-cli php8.3-mysql php8.3-xml > /dev/null +RUN apt-get install -yqq php8.4-cli php8.4-mysql php8.4-xml > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null && \ - pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini WORKDIR /workerman COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -COPY php-jit.ini /etc/php/8.3/cli/conf.d/10-opcache.ini +COPY php-jit.ini /etc/php/8.4/cli/conf.d/10-opcache.ini EXPOSE 8080 From 3339d6d2ffc0adcf7f19498a12dd9ab09e8b0b0b Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Fri, 22 Nov 2024 10:48:38 +0100 Subject: [PATCH 5/7] Update workerman-mysql-jit.dockerfile to PHP/8.4 --- frameworks/PHP/workerman/workerman-mysql-jit.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile b/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile index 95271c59d37..8992f918a0d 100644 --- a/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-mysql-jit.dockerfile @@ -10,18 +10,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.3-cli php8.3-mysql php8.3-xml > /dev/null +RUN apt-get install -yqq php8.4-cli php8.4-mysql php8.4-xml > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null && \ - pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini WORKDIR /workerman COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -COPY php-jit.ini /etc/php/8.3/cli/conf.d/10-opcache.ini +COPY php-jit.ini /etc/php/8.4/cli/conf.d/10-opcache.ini EXPOSE 8080 From 931a4ed47e061f76b6b5e9199a9a854cb101de66 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Fri, 22 Nov 2024 10:49:28 +0100 Subject: [PATCH 6/7] Update workerman-pgsql-jit.dockerfile to PHP/8.4 #9408 --- frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile b/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile index aaee452d7e8..f1e84f54011 100644 --- a/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql-jit.dockerfile @@ -10,18 +10,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null +RUN apt-get install -yqq php8.4-cli php8.4-pgsql php8.4-xml > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null && \ - pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini WORKDIR /workerman COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -COPY php-jit.ini /etc/php/8.3/cli/conf.d/10-opcache.ini +COPY php-jit.ini /etc/php/8.4/cli/conf.d/10-opcache.ini EXPOSE 8080 From a3f53e22408054ba8db4b457227ffab186c23bbc Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Fri, 22 Nov 2024 10:49:59 +0100 Subject: [PATCH 7/7] Update workerman-pgsql.dockerfile to PHP/8.4 #9408 --- frameworks/PHP/workerman/workerman-pgsql.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/PHP/workerman/workerman-pgsql.dockerfile b/frameworks/PHP/workerman/workerman-pgsql.dockerfile index 54e6d834c66..f8209fb7d00 100644 --- a/frameworks/PHP/workerman/workerman-pgsql.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql.dockerfile @@ -10,18 +10,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null +RUN apt-get install -yqq php8.4-cli php8.4-pgsql php8.4-xml > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null && \ - pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini WORKDIR /workerman COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -COPY php.ini /etc/php/8.3/cli/php.ini +COPY php.ini /etc/php/8.4/cli/php.ini EXPOSE 8080