Skip to content

Commit 7564a23

Browse files
authored
Add support for PHP 8.4 (#108)
1 parent 71b61d1 commit 7564a23

10 files changed

+62
-44
lines changed

.github/workflows/frankenphp-test.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
jobs:
1616
debian-build:
1717
name: Build and Run Debian-based Docker image
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
strategy:
2020
fail-fast: true
2121
matrix:
22-
php: [ 8.2, 8.3 ]
22+
php: [ 8.3, 8.4 ]
2323
timeout-minutes: 15
2424
steps:
2525
- name: Checkout code
@@ -35,10 +35,10 @@ jobs:
3535

3636
- name: Get Composer cache directory
3737
id: composer-cache
38-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3939

4040
- name: Cache PHP dependencies
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
with:
4343
path: ${{ steps.composer-cache.outputs.dir }}
4444
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -63,22 +63,25 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 8000:8000 app:local
66+
run: docker run -d --name app --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
70-
run: sleep 10s
70+
run: sleep 30s
71+
72+
- name: Print the container logs
73+
run: docker logs app
7174

7275
- name: Check application health
7376
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000
7477

7578
alpine-build:
7679
name: Build and Run Alpine-based Docker image
77-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-24.04
7881
strategy:
7982
fail-fast: true
8083
matrix:
81-
php: [ 8.2, 8.3 ]
84+
php: [ 8.3, 8.4 ]
8285
timeout-minutes: 15
8386
steps:
8487
- name: Checkout code
@@ -94,10 +97,10 @@ jobs:
9497

9598
- name: Get Composer cache directory
9699
id: composer-cache
97-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
100+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
98101

99102
- name: Cache PHP dependencies
100-
uses: actions/cache@v2
103+
uses: actions/cache@v3
101104
with:
102105
path: ${{ steps.composer-cache.outputs.dir }}
103106
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -122,11 +125,14 @@ jobs:
122125
working-directory: /var/www/app
123126

124127
- name: Run the Docker container
125-
run: docker run -d --rm -p 8000:8000 app:local
128+
run: docker run -d --name app --rm -p 8000:8000 app:local
126129
working-directory: /var/www/app
127130

128131
- name: Wait for the container
129-
run: sleep 10s
132+
run: sleep 30s
133+
134+
- name: Print the container logs
135+
run: docker logs app
130136

131137
- name: Check application health
132138
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

.github/workflows/roadrunner-test.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
jobs:
1616
debian-build:
1717
name: Build and Run Debian-based Docker image
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
strategy:
2020
fail-fast: true
2121
matrix:
22-
php: [ 8.2, 8.3 ]
22+
php: [ 8.3, 8.4 ]
2323
timeout-minutes: 15
2424
steps:
2525
- name: Checkout code
@@ -35,10 +35,10 @@ jobs:
3535

3636
- name: Get Composer cache directory
3737
id: composer-cache
38-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3939

4040
- name: Cache PHP dependencies
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
with:
4343
path: ${{ steps.composer-cache.outputs.dir }}
4444
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -63,22 +63,25 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 8000:8000 app:local
66+
run: docker run -d --name app --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
70-
run: sleep 10s
70+
run: sleep 30s
71+
72+
- name: Print the container logs
73+
run: docker logs app
7174

7275
- name: Check application health
7376
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000
7477

7578
alpine-build:
7679
name: Build and Run Alpine-based Docker image
77-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-24.04
7881
strategy:
7982
fail-fast: true
8083
matrix:
81-
php: [ 8.2, 8.3 ]
84+
php: [ 8.3, 8.4 ]
8285
timeout-minutes: 15
8386
steps:
8487
- name: Checkout code
@@ -94,10 +97,10 @@ jobs:
9497

9598
- name: Get Composer cache directory
9699
id: composer-cache
97-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
100+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
98101

99102
- name: Cache PHP dependencies
100-
uses: actions/cache@v2
103+
uses: actions/cache@v3
101104
with:
102105
path: ${{ steps.composer-cache.outputs.dir }}
103106
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -122,11 +125,14 @@ jobs:
122125
working-directory: /var/www/app
123126

124127
- name: Run the Docker container
125-
run: docker run -d --rm -p 8000:8000 app:local
128+
run: docker run -d --name app --rm -p 8000:8000 app:local
126129
working-directory: /var/www/app
127130

128131
- name: Wait for the container
129-
run: sleep 10s
132+
run: sleep 30s
133+
134+
- name: Print the container logs
135+
run: docker logs app
130136

131137
- name: Check application health
132138
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

.github/workflows/swoole-test.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
jobs:
1616
debian-build:
1717
name: Build and Run Debian-based Docker image
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
strategy:
2020
fail-fast: true
2121
matrix:
22-
php: [ 8.2, 8.3 ]
22+
php: [ 8.3, 8.4 ]
2323
timeout-minutes: 15
2424
steps:
2525
- name: Checkout code
@@ -35,10 +35,10 @@ jobs:
3535

3636
- name: Get Composer cache directory
3737
id: composer-cache
38-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3939

4040
- name: Cache PHP dependencies
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
with:
4343
path: ${{ steps.composer-cache.outputs.dir }}
4444
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -63,22 +63,25 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 8000:8000 app:local
66+
run: docker run -d --name app --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
70-
run: sleep 10s
70+
run: sleep 30s
71+
72+
- name: Print the container logs
73+
run: docker logs app
7174

7275
- name: Check application health
7376
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000
7477

7578
alpine-build:
7679
name: Build and Run Alpine-based Docker image
77-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-24.04
7881
strategy:
7982
fail-fast: true
8083
matrix:
81-
php: [ 8.2, 8.3 ]
84+
php: [ 8.3, 8.4 ]
8285
timeout-minutes: 15
8386
steps:
8487
- name: Checkout code
@@ -94,10 +97,10 @@ jobs:
9497

9598
- name: Get Composer cache directory
9699
id: composer-cache
97-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
100+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
98101

99102
- name: Cache PHP dependencies
100-
uses: actions/cache@v2
103+
uses: actions/cache@v3
101104
with:
102105
path: ${{ steps.composer-cache.outputs.dir }}
103106
key: "${{ runner.os }}-composer-${{ matrix.setup }}"
@@ -122,11 +125,14 @@ jobs:
122125
working-directory: /var/www/app
123126

124127
- name: Run the Docker container
125-
run: docker run -d --rm -p 8000:8000 app:local
128+
run: docker run -d --name app --rm -p 8000:8000 app:local
126129
working-directory: /var/www/app
127130

128131
- name: Wait for the container
129-
run: sleep 10s
132+
run: sleep 30s
133+
134+
- name: Print the container logs
135+
run: docker logs app
130136

131137
- name: Check application health
132138
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

FrankenPHP.Alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG FRANKENPHP_VERSION=1.3.6
33
ARG COMPOSER_VERSION=2.8
44
ARG BUN_VERSION="latest"

FrankenPHP.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG FRANKENPHP_VERSION=1.3.6
33
ARG COMPOSER_VERSION=2.8
44
ARG BUN_VERSION="latest"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ powered web services and microservices.
1212

1313
The Docker configuration provides the following setup:
1414

15-
- PHP 8.2 and 8.3 official Debian-based and Alpine-based images
15+
- PHP 8.3 and 8.4 official Debian-based and Alpine-based images
1616
- Preconfigured PHP runtime, JIT compiler, and OPcache
1717
- Preconfigured Caddy server
1818
- Preconfigured Swoole HTTP server
@@ -99,7 +99,7 @@ return [
9999

100100
## ToDo
101101
- [ ] Add Docker Compose
102-
- [ ] Add support for PHP 8.4
102+
- [x] Add support for PHP 8.4
103103
- [x] Add support for worker mode
104104
- [x] Build assets with Bun
105105
- [ ] Create standalone and self-executable app

RoadRunner.Alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG COMPOSER_VERSION=2.8
33
ARG BUN_VERSION="latest"
44

RoadRunner.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG COMPOSER_VERSION=2.8
33
ARG BUN_VERSION="latest"
44

Swoole.Alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG COMPOSER_VERSION=2.8
33
ARG BUN_VERSION="latest"
44

Swoole.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.3
1+
ARG PHP_VERSION=8.4
22
ARG COMPOSER_VERSION=2.8
33
ARG BUN_VERSION="latest"
44

0 commit comments

Comments
 (0)