Skip to content

Commit 51d5835

Browse files
committed
Add Support for PHP 8.5
1 parent 812fda0 commit 51d5835

7 files changed

Lines changed: 350 additions & 197 deletions

File tree

.env.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ XDEBUG_MODE=debug
1010

1111
# XDebug Configuration (https://xdebug.org/docs/all_settings#XDEBUG_CONFIG)
1212
XDEBUG_CONFIG="client_host=host.docker.internal start_with_request=trigger idekey=PHPSTORM output_dir=/var/www/build/xdebug"
13+
14+
# Docker image tag for the php image (e.g. 8.4-cli, 8.5-cli)
15+
PHP_VERSION=8.4-cli
16+
17+
# Controls the Docker build arg toggling Xdebug extension installation
18+
WITH_XDEBUG=false

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/captainhook.json export-ignore
2626
/codecov.yml export-ignore
2727
/compose.yaml export-ignore
28-
/compose.yml export-ignore
28+
/compose.yml export-ignore
2929
/composer.lock export-ignore
3030
/conventional-commits.json export-ignore
3131
/docker-compose.yaml export-ignore

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.0.2 [2025-11-13]
9+
10+
### Added
11+
12+
- Add explicit support for PHP 8.5 in composer.json constraints.
13+
- [Development Docker Image] Add `PHP_VERSION` and `WITH_XDEBUG` environment variables and build args to make Docker image more flexible.
14+
15+
### Changed
16+
17+
- Remove composer.json repository override for 'phoneburner/php-coding-standard' (as it is now available on Packagist)
18+
- [Development Docker Image] Switch from PECL to PIE for installing PHP extensions.
19+
- [Development Docker Image] Optional Xdebug extension is no longer installed by default.
20+
- [Development Docker Image] Install git, fixing Composer root-version warning message.
21+
22+
### Fixed
23+
24+
- Fix whitespace issues in .gitattributes
25+
826
## [1.0.1] - 2025-07-30
927

1028
### Added

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# PHP Build Stages
44
##------------------------------------------------------------------------------
55

6-
FROM php:8.4-cli AS php
6+
ARG PHP_VERSION=8.4-cli
7+
FROM php:${PHP_VERSION} AS php
8+
ARG WITH_XDEBUG=false
79
ARG USER_UID=1000
810
ARG USER_GID=1000
911
WORKDIR /app
@@ -19,16 +21,18 @@ RUN groupadd --gid $USER_GID dev \
1921
RUN --mount=type=cache,target=/var/lib/apt,sharing=locked apt-get update && apt-get dist-upgrade --yes
2022

2123
RUN --mount=type=cache,target=/var/lib/apt apt-get install --yes --quiet --no-install-recommends \
24+
git \
2225
libzip-dev \
2326
unzip \
2427
&& cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
2528

26-
RUN <<-EOF
27-
set -eux
28-
export MAKEFLAGS="-j $(nproc)"
29-
pecl install xdebug
30-
docker-php-ext-enable xdebug
31-
EOF
29+
COPY --from=ghcr.io/php/pie:bin /pie /usr/bin/pie
30+
31+
RUN if [ "${WITH_XDEBUG}" != "false" ]; then \
32+
pie install xdebug/xdebug; \
33+
else \
34+
echo 'Skipping Installation of the Xdebug Extension...'; \
35+
fi
3236

3337
RUN <<-EOF
3438
set -eux

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
],
5454
"require": {
55-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
55+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
5656
"phoneburner/http-tortilla": "^2.0.0",
5757
"psr/http-factory": "^1.0",
5858
"psr/http-message": "^2.0",

0 commit comments

Comments
 (0)