Skip to content

Commit 3a48d46

Browse files
authored
Merge pull request #244 from clue-labs/php8.3
Update documentation and container images to PHP 8.3
2 parents 7f64e51 + 5bc6c3c commit 3a48d46

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- ubuntu-22.04
1515
- windows-2022
1616
php:
17+
- 8.3
1718
- 8.2
1819
- 8.1
1920
- 8.0
@@ -22,7 +23,7 @@ jobs:
2223
- 7.2
2324
- 7.1
2425
steps:
25-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2627
- uses: shivammathur/setup-php@v2
2728
with:
2829
php-version: ${{ matrix.php }}
@@ -46,6 +47,7 @@ jobs:
4647
strategy:
4748
matrix:
4849
php:
50+
- 8.3
4951
- 8.2
5052
- 8.1
5153
- 8.0
@@ -54,7 +56,7 @@ jobs:
5456
- 7.2
5557
- 7.1
5658
steps:
57-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
5860
- uses: shivammathur/setup-php@v2
5961
with:
6062
php-version: ${{ matrix.php }}
@@ -68,6 +70,7 @@ jobs:
6870
strategy:
6971
matrix:
7072
php:
73+
- 8.3
7174
- 8.2
7275
- 8.1
7376
- 8.0
@@ -76,7 +79,7 @@ jobs:
7679
- 7.2
7780
- 7.1
7881
steps:
79-
- uses: actions/checkout@v3
82+
- uses: actions/checkout@v4
8083
- uses: shivammathur/setup-php@v2
8184
with:
8285
php-version: ${{ matrix.php }}
@@ -94,10 +97,10 @@ jobs:
9497
- "Dockerfile-basics"
9598
- "Dockerfile-production"
9699
steps:
97-
- uses: actions/checkout@v3
100+
- uses: actions/checkout@v4
98101
- uses: shivammathur/setup-php@v2
99102
with:
100-
php-version: 8.2
103+
php-version: 8.3
101104
- run: composer install -d tests/install-as-dep/
102105
- run: docker build -f tests/${{ matrix.dockerfile }} tests/install-as-dep/
103106
- run: docker run -d -p 8080:8080 -v "$PWD/examples/index.php":/app/public/index.php -v "$PWD/composer.json":/app/composer.json -v "$PWD/LICENSE":/app/LICENSE -v "$PWD/tests/":/app/tests/ $(docker images -q | head -n1)
@@ -113,6 +116,7 @@ jobs:
113116
strategy:
114117
matrix:
115118
php:
119+
- 8.3
116120
- 8.2
117121
- 8.1
118122
- 8.0
@@ -121,7 +125,7 @@ jobs:
121125
- 7.2
122126
- 7.1
123127
steps:
124-
- uses: actions/checkout@v3
128+
- uses: actions/checkout@v4
125129
- uses: shivammathur/setup-php@v2
126130
with:
127131
php-version: ${{ matrix.php }}
@@ -137,6 +141,7 @@ jobs:
137141
strategy:
138142
matrix:
139143
php:
144+
- 8.3
140145
- 8.2
141146
- 8.1
142147
- 8.0
@@ -145,7 +150,7 @@ jobs:
145150
- 7.2
146151
- 7.1
147152
steps:
148-
- uses: actions/checkout@v3
153+
- uses: actions/checkout@v4
149154
- uses: shivammathur/setup-php@v2
150155
with:
151156
php-version: ${{ matrix.php }}
@@ -160,6 +165,7 @@ jobs:
160165
strategy:
161166
matrix:
162167
php:
168+
- 8.3
163169
- 8.2
164170
- 8.1
165171
- 8.0
@@ -168,7 +174,7 @@ jobs:
168174
- 7.2
169175
- 7.1
170176
steps:
171-
- uses: actions/checkout@v3
177+
- uses: actions/checkout@v4
172178
- uses: shivammathur/setup-php@v2
173179
with:
174180
php-version: ${{ matrix.php }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react/socket": "^1.13"
2020
},
2121
"require-dev": {
22-
"phpstan/phpstan": "1.10.16 || 1.4.10",
22+
"phpstan/phpstan": "1.10.47 || 1.4.10",
2323
"phpunit/phpunit": "^9.6 || ^7.5",
2424
"psr/container": "^2 || ^1",
2525
"react/promise-timer": "^1.10"

docs/best-practices/deployment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ If you're not already running an Apache server, you can run your X project with
220220
Apache in a temporary Docker container like this:
221221

222222
```bash
223-
$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.2-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
223+
$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.3-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
224224
```
225225

226226
In order to check your web application responds as expected, you can use your
@@ -304,10 +304,10 @@ limit to match your concurrency workload. On Ubuntu- or Debian-based systems,
304304
you may change your PHP configuration like this:
305305

306306
```bash
307-
$ sudoedit /etc/php/8.2/cli/php.ini
307+
$ sudoedit /etc/php/8.3/cli/php.ini
308308
```
309309

310-
```diff title="/etc/php/8.2/cli/php.ini"
310+
```diff title="/etc/php/8.3/cli/php.ini"
311311
- memory_limit = 128M
312312
+ memory_limit = -1
313313
```
@@ -519,7 +519,7 @@ be achieved by using a `Dockerfile` with the following contents:
519519

520520
```docker title="Dockerfile"
521521
# syntax=docker/dockerfile:1
522-
FROM php:8.2-cli
522+
FROM php:8.3-cli
523523

524524
WORKDIR /app/
525525
COPY public/ public/
@@ -541,7 +541,7 @@ be achieved by using a `Dockerfile` with the following contents:
541541
COPY composer.json composer.lock ./
542542
RUN composer install --no-dev --ignore-platform-reqs --optimize-autoloader
543543

544-
FROM php:8.2-alpine
544+
FROM php:8.3-alpine
545545

546546
# recommended: install optional extensions ext-ev and ext-sockets
547547
RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \

tests/AppTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ public function testInvokeWithMatchingRouteReturnsInternalServerErrorResponseWhe
13231323

13241324
$line = __LINE__ + 2;
13251325
$app->get('/users', function () {
1326-
return await(reject(new \RuntimeException('Foo')));
1326+
await(reject(new \RuntimeException('Foo')));
13271327
});
13281328

13291329
$request = new ServerRequest('GET', 'http://localhost/users');

tests/Dockerfile-basics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM php:8.2-cli
2+
FROM php:8.3-cli
33

44
WORKDIR /app/
55
COPY public/ public/

tests/Dockerfile-production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY composer.json composer.lock ./
88
# dev environment already has dependencies installed:
99
COPY vendor/ vendor/
1010

11-
FROM php:8.2-alpine
11+
FROM php:8.3-alpine
1212

1313
# recommended: install optional extensions ext-ev and ext-sockets
1414
RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \

0 commit comments

Comments
 (0)