Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: php 8.4 support #66

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- master

name: 🐞 Differential shell-check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<br>
</p>

<div align="center">
<p align="center">
<a href="https://actions-badge.atrox.dev/wayofdev/docker-php-dev/goto"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fdocker-php-dev%2Fbadge&style=flat-square"/></a>
<a href="https://github.com/wayofdev/docker-php-dev/tags"><img src="https://img.shields.io/github/v/tag/wayofdev/docker-php-dev?sort=semver&style=flat-square" alt="Latest Version"></a>
<a href="https://hub.docker.com/repository/docker/wayofdev/php-dev"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/wayofdev/php-dev?style=flat-square"></a>
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/wayofdev/docker-php-dev.svg?style=flat-square&color=blue" alt="Software License"/></a>
<a href="#"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/docker-php-dev/latest?style=flat-square"></a>
</div>
</p>

<br>

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
]
}

Expand All @@ -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",
]
}
21 changes: 20 additions & 1 deletion src/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

...
Loading