Skip to content

Commit 2f9a21e

Browse files
committed
[php] Webman update to PHP 8.4
1 parent 9bf0339 commit 2f9a21e

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

frameworks/PHP/webman/app/controller/Index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class Index
1111
{
12-
public function plaintext($request)
12+
public function plaintext()
1313
{
1414
return new Response(200, [
1515
'Content-Type' => 'text/plain',
@@ -18,15 +18,15 @@ public function plaintext($request)
1818
}
1919

2020

21-
public function json($request)
21+
public function json()
2222
{
2323
return new Response(200, [
2424
'Content-Type' => 'application/json',
2525
'Date' => Date::$date
2626
], json_encode(['message' => 'Hello, World!']));
2727
}
2828

29-
public function db($request)
29+
public function db()
3030
{
3131
$statement = Db::$random;
3232
$statement->execute([\mt_rand(1, 10000)]);
@@ -37,7 +37,7 @@ public function db($request)
3737
], json_encode($statement->fetch()));
3838
}
3939

40-
public function fortunes($request)
40+
public function fortunes()
4141
{
4242
$fortune = Db::$fortune;
4343

@@ -59,7 +59,7 @@ public function fortunes($request)
5959
);
6060
}
6161

62-
public function queries($request, $q = 1)
62+
public function queries(Request $request, $q = 1)
6363
{
6464
$statement = Db::$random;
6565

@@ -80,7 +80,7 @@ public function queries($request, $q = 1)
8080
], json_encode($arr));
8181
}
8282

83-
public function updates($request, $q = 1)
83+
public function updates(Request $request, $q = 1)
8484
{
8585
$random = Db::$random;
8686

frameworks/PHP/webman/composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
},
2626
"require": {
2727
"php": ">=7.2",
28-
"workerman/webman-framework": "^1.0",
28+
"workerman/webman-framework": "dev-master",
2929
"monolog/monolog": "^2.0",
30-
"vlucas/phpdotenv": ">=4.1,<6.0"
30+
"vlucas/phpdotenv": ">=4.1,<6.0",
31+
"workerman/workerman": "dev-master"
3132
},
3233
"suggest": {
3334
"ext-event": "For better performance. "
@@ -51,5 +52,6 @@
5152
"pre-package-uninstall": [
5253
"support\\Plugin::uninstall"
5354
]
54-
}
55-
}
55+
},
56+
"minimum-stability": "dev"
57+
}

frameworks/PHP/webman/webman-pgsql.dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de
88
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
99
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
1010

11-
RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null
11+
RUN apt-get install -yqq php8.4-cli php8.4-pgsql php8.4-xml > /dev/null
1212

1313
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
1414

15-
RUN apt-get update -yqq && apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null
16-
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini
15+
RUN apt-get update -yqq && apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null
16+
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini
1717

18-
ADD ./ /webman
1918
WORKDIR /webman
19+
COPY --link . .
2020

2121
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
22-
COPY php.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
22+
COPY php.ini /etc/php/8.4/cli/conf.d/10-opcache.ini
2323

2424
EXPOSE 8080
2525

26-
CMD php /webman/start.php start
26+
CMD php /webman/start.php start

frameworks/PHP/webman/webman.dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de
88
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
99
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
1010

11-
RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null
11+
RUN apt-get install -yqq php8.4-cli php8.4-pgsql php8.4-xml > /dev/null
1212

1313
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
1414

15-
RUN apt-get update -yqq && apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null
16-
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/30-event.ini
15+
RUN apt-get update -yqq && apt-get install -y php-pear php8.4-dev libevent-dev git > /dev/null
16+
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/30-event.ini
1717

18-
ADD ./ /webman
1918
WORKDIR /webman
19+
COPY --link . .
2020

2121
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
22-
COPY php.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
22+
COPY php.ini /etc/php/8.4/cli/conf.d/10-opcache.ini
2323

2424
EXPOSE 8080
2525

26-
CMD php /webman/start.php start
26+
CMD php /webman/start.php start

0 commit comments

Comments
 (0)