From 7d372e2dc1356f390c9cb23d94006dfa356e7ddc Mon Sep 17 00:00:00 2001
From: lotyp
Date: Thu, 5 Dec 2024 22:09:07 +0200
Subject: [PATCH] feat: php 8.4 support
---
.github/workflows/build.yml | 4 ++--
.github/workflows/shellcheck.yml | 2 ++
.github/workflows/test.yml | 2 +-
Makefile | 2 +-
README.md | 17 ++++++++++-------
docker-bake.hcl | 32 ++++++++++++++++++++++++++++++++
src/inventory.yml | 21 ++++++++++++++++++++-
7 files changed, 68 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4ce4978..36508de 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy
types:
- released
schedule:
- - cron: "30 10 * * *"
+ - cron: "30 8 * * *"
env:
DOCKER_NAMESPACE: wayofdev/php-dev
@@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os_name: ["alpine"]
- php_version: ["8.1", "8.2", "8.3"]
+ php_version: ["8.1", "8.2", "8.3", "8.4"]
php_type: ["fpm", "cli", "supervisord"]
builder: [{arch: "amd64", os: "ubuntu-latest"}, {arch: "arm64", os: "ubuntu-latest"}]
runs-on: ${{ matrix.builder.os }}
diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml
index 19a38b9..026faad 100644
--- a/.github/workflows/shellcheck.yml
+++ b/.github/workflows/shellcheck.yml
@@ -2,6 +2,8 @@
on: # yamllint disable-line rule:truthy
pull_request:
+ branches:
+ - master
name: 🐞 Differential shell-check
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7e91f5c..9222ed4 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os_name: ["alpine"]
- php_version: ["8.1", "8.2", "8.3"]
+ php_version: ["8.1", "8.2", "8.3", "8.4"]
php_type: ["fpm", "cli", "supervisord"]
builder: [{arch: "amd64", os: "ubuntu-latest"}]
runs-on: ${{ matrix.builder.os }}
diff --git a/Makefile b/Makefile
index 47d900a..3a786dc 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ export COMPOSE_DOCKER_CLI_BUILD ?= 1
DOCKER ?= docker
IMAGE_NAMESPACE ?= wayofdev/php-dev
-IMAGE_TEMPLATE ?= 8.3-cli-alpine
+IMAGE_TEMPLATE ?= 8.4-cli-alpine
IMAGE_TAG ?= $(IMAGE_NAMESPACE):$(IMAGE_TEMPLATE)-latest
DOCKERFILE_DIR ?= ./dist/dev/$(IMAGE_TEMPLATE)
diff --git a/README.md b/README.md
index d821620..97486c6 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@
-
+
@@ -32,7 +32,7 @@ If you **like/use** this package, please consider ⭐️ **starring** it. Thanks
## 🚀 Features
- **Based on wayofdev/docker-php-base:** Inherits all features and extensions from the base image.
-- **PHP Versions:** Supports PHP `8.1`, `8.2`, and `8.3`.
+- **PHP Versions:** Supports PHP `8.1`, `8.2`, `8.3`, and `8.4`.
- **Image Types:** Available in CLI, FPM, and Supervisord variants.
- **Xdebug:** Pre-installed and configured for debugging.
- **Development Tools:** Includes `git`, `bash`, `unzip`, `nano`, and more.
@@ -79,7 +79,7 @@ Replace `8.3-fpm-alpine-latest` with your desired PHP version, type, and tag.
### → Available Image Variants
-- **PHP Versions:** 8.1, 8.2, 8.3
+- **PHP Versions:** 8.1, 8.2, 8.3, 8.4
- **Types:** cli, fpm, supervisord
- **Architectures:** amd64, arm64
@@ -101,7 +101,6 @@ docker pull wayofdev/php-dev:8.3-supervisord-alpine-latest
Here's a more comprehensive example `docker-compose.yml` for a Laravel project with additional services:
```yaml
-version: '3.8'
services:
app:
image: wayofdev/php-dev:8.3-fpm-alpine-latest
@@ -114,8 +113,6 @@ services:
- database
links:
- database
- external_links:
- - 'rabbitmq.${COMPOSE_PROJECT_NAME}.alias:rabbitmq'
volumes:
- ./.github/assets:/assets:rw,cached
- ./app:/app:rw,cached
@@ -227,6 +224,9 @@ make generate
make build IMAGE_TEMPLATE="8.3-cli-alpine"
make build IMAGE_TEMPLATE="8.3-fpm-alpine"
make build IMAGE_TEMPLATE="8.3-supervisord-alpine"
+ make build IMAGE_TEMPLATE="8.4-cli-alpine"
+ make build IMAGE_TEMPLATE="8.4-fpm-alpine"
+ make build IMAGE_TEMPLATE="8.4-supervisord-alpine"
```
These commands will build all supported image variants.
@@ -269,6 +269,9 @@ You can run tests using the following commands:
make test IMAGE_TEMPLATE="8.3-cli-alpine"
make test IMAGE_TEMPLATE="8.3-fpm-alpine"
make test IMAGE_TEMPLATE="8.3-supervisord-alpine"
+ make test IMAGE_TEMPLATE="8.4-cli-alpine"
+ make test IMAGE_TEMPLATE="8.4-fpm-alpine"
+ make test IMAGE_TEMPLATE="8.4-supervisord-alpine"
```
### → Test Configuration
diff --git a/docker-bake.hcl b/docker-bake.hcl
index be1832e..bd83afe 100644
--- a/docker-bake.hcl
+++ b/docker-bake.hcl
@@ -71,6 +71,27 @@ target "php-83-supervisord-alpine" {
dockerfile = "./Dockerfile"
}
+###########################
+## PHP 8.4
+###########################
+target "php-84-cli-alpine" {
+ inherits = ["docker-metadata-action"]
+ context = "dist/dev/8.4-cli-alpine"
+ dockerfile = "./Dockerfile"
+}
+
+target "php-84-fpm-alpine" {
+ inherits = ["docker-metadata-action"]
+ context = "dist/dev/8.4-fpm-alpine"
+ dockerfile = "./Dockerfile"
+}
+
+target "php-84-supervisord-alpine" {
+ inherits = ["docker-metadata-action"]
+ context = "dist/dev/8.4-supervisord-alpine"
+ dockerfile = "./Dockerfile"
+}
+
group "all" {
targets = [
"php-81-cli-alpine",
@@ -82,6 +103,9 @@ group "all" {
"php-83-cli-alpine",
"php-83-fpm-alpine",
"php-83-supervisord-alpine",
+ "php-84-cli-alpine",
+ "php-84-fpm-alpine",
+ "php-84-supervisord-alpine",
]
}
@@ -108,3 +132,11 @@ group "php-83" {
"php-83-supervisord-alpine",
]
}
+
+group "php-84" {
+ targets = [
+ "php-84-cli-alpine",
+ "php-84-fpm-alpine",
+ "php-84-supervisord-alpine",
+ ]
+}
diff --git a/src/inventory.yml b/src/inventory.yml
index 02a97c6..64c4335 100644
--- a/src/inventory.yml
+++ b/src/inventory.yml
@@ -80,7 +80,7 @@ all:
php_version: 8.2
php_type: supervisord
os_name: alpine
- # PHP 8.2
+ # PHP 8.3
8.3-cli-alpine:
ansible_connection: local
level: dev
@@ -99,5 +99,24 @@ all:
php_version: 8.3
php_type: supervisord
os_name: alpine
+ # PHP 8.4
+ 8.4-cli-alpine:
+ ansible_connection: local
+ level: dev
+ php_version: 8.4
+ php_type: cli
+ os_name: alpine
+ 8.4-fpm-alpine:
+ ansible_connection: local
+ level: dev
+ php_version: 8.4
+ php_type: fpm
+ os_name: alpine
+ 8.4-supervisord-alpine:
+ ansible_connection: local
+ level: dev
+ php_version: 8.4
+ php_type: supervisord
+ os_name: alpine
...