Skip to content

Commit 92e35d3

Browse files
authored
Merge pull request #277 from GrahamCampbell/php-85
Add PHP 8.5 support
2 parents 6a1aa70 + e0c6bb2 commit 92e35d3

File tree

13 files changed

+628
-16
lines changed

13 files changed

+628
-16
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
script: |
2626
const matrix = {
2727
cpu: ['x86', 'arm'],
28-
php_version: ['80', '81', '82', '83', '84'],
28+
php_version: ['80', '81', '82', '83', '84', '85'],
2929
}
3030
3131
// If this is a third-party pull request, skip ARM builds

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ default: docker-images layers
3535

3636

3737
# Build Docker images *locally*
38-
docker-images: docker-images-php-80 docker-images-php-81 docker-images-php-82 docker-images-php-83 docker-images-php-84
38+
docker-images: docker-images-php-80 docker-images-php-81 docker-images-php-82 docker-images-php-83 docker-images-php-84 docker-images-php-85
3939
docker-images-php-%:
4040
PHP_VERSION=$* ${BAKE_COMMAND} --load
4141

4242

4343
# Build Lambda layers (zip files) *locally*
44-
layers: layer-php-80 layer-php-81 layer-php-82 layer-php-83 layer-php-84 layer-php-80-fpm layer-php-81-fpm layer-php-82-fpm layer-php-83-fpm layer-php-84-fpm
44+
layers: layer-php-80 layer-php-81 layer-php-82 layer-php-83 layer-php-84 layer-php-85 layer-php-80-fpm layer-php-81-fpm layer-php-82-fpm layer-php-83-fpm layer-php-84-fpm layer-php-85-fpm
4545
# Build the console layer only once (x86 and single PHP version)
4646
@if [ ${CPU} = "x86" ]; then \
4747
$(MAKE) layer-console; \
@@ -57,7 +57,7 @@ layer-%:
5757
# Upload the layers to AWS Lambda
5858
# Uses the current AWS_PROFILE. Most users will not want to use this option
5959
# as this will publish all layers to all regions + publish all Docker images.
60-
upload-layers: upload-layers-php-80 upload-layers-php-81 upload-layers-php-82 upload-layers-php-83 upload-layers-php-84
60+
upload-layers: upload-layers-php-80 upload-layers-php-81 upload-layers-php-82 upload-layers-php-83 upload-layers-php-84 upload-layers-php-85
6161
# Upload the console layer only once (x86 and single PHP version)
6262
@if [ ${CPU} = "x86" ]; then \
6363
LAYER_NAME=console $(MAKE) -C ./utils/lambda-publish publish-parallel; \
@@ -70,7 +70,7 @@ upload-layers-php-%:
7070

7171

7272
# Publish Docker images to Docker Hub.
73-
upload-to-docker-hub: upload-to-docker-hub-php-80 upload-to-docker-hub-php-81 upload-to-docker-hub-php-82 upload-to-docker-hub-php-83 upload-to-docker-hub-php-84
73+
upload-to-docker-hub: upload-to-docker-hub-php-80 upload-to-docker-hub-php-81 upload-to-docker-hub-php-82 upload-to-docker-hub-php-83 upload-to-docker-hub-php-84 upload-to-docker-hub-php-85
7474
upload-to-docker-hub-php-%:
7575
# Make sure we have defined the docker tag
7676
(test $(DOCKER_TAG)) && echo "Tagging images with \"${DOCKER_TAG}\"" || echo "You have to define environment variable DOCKER_TAG"
@@ -89,12 +89,12 @@ upload-to-docker-hub-php-%:
8989
done
9090

9191

92-
test: test-80 test-81 test-82 test-83 test-84
92+
test: test-80 test-81 test-82 test-83 test-84 test-85
9393
test-%:
9494
cd tests && $(MAKE) test-$*
9595

9696

97-
clean: clean-80 clean-81 clean-82 clean-83 clean-84
97+
clean: clean-80 clean-81 clean-82 clean-83 clean-84 clean-85
9898
# Clear the build cache, else all images will be rebuilt using cached layers
9999
docker builder prune
100100
# Remove zip files

layers/fpm-dev/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ ARG PHP_VERSION
1010
RUN mkdir -p /opt/bref/extensions
1111

1212
# Install xdebug
13-
RUN pecl install xdebug-3.4.5
14-
RUN cp $(php -r "echo ini_get('extension_dir');")/xdebug.so /opt/bref/extensions
13+
RUN if [ $PHP_VERSION != "85" ]; then pecl install xdebug-3.4.5; fi
14+
RUN if [ $PHP_VERSION != "85" ]; then cp $(php -r "echo ini_get('extension_dir');")/xdebug.so /opt/bref/extensions; fi
1515

1616
# Install Blackfire
1717
# https://blackfire.io/docs/up-and-running/installation?action=install&mode=full&version=latest&mode=full&location=server&os=manual&language=php#install-the-php-probe
1818
ARG BLACKFIRE_VERSION=1.87.2
19-
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $CPU_PREFIX == "" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_amd64-php-"$PHP_VERSION".so"; fi
20-
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $CPU_PREFIX == "arm-" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_arm64-php-"$PHP_VERSION".so"; fi
19+
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $PHP_VERSION != "85" ] && [ $CPU_PREFIX == "" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_amd64-php-"$PHP_VERSION".so"; fi
20+
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $PHP_VERSION != "85" ] && [ $CPU_PREFIX == "arm-" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_arm64-php-"$PHP_VERSION".so"; fi
2121

2222

2323
FROM bref/${CPU_PREFIX}php-${PHP_VERSION}-fpm

layers/fpm/bref.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ upload_max_filesize=6M
4747
extension_dir=/opt/bref/extensions
4848
; Extensions enabled by default
4949
extension=pdo_mysql.so
50-
zend_extension=opcache.so

layers/function/bref.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ variables_order="EGPCS"
4141
extension_dir=/opt/bref/extensions
4242
; Extensions enabled by default
4343
extension=pdo_mysql.so
44-
zend_extension=opcache.so

layers/opcache.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zend_extension=opcache.so

php-80/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ COPY --link layers/bootstrap.php /opt/bref/bootstrap.php
514514
FROM isolation as function
515515

516516
COPY --link layers/function/bref.ini /opt/bref/etc/php/conf.d/
517+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
517518

518519
COPY --link layers/function/bootstrap.sh /opt/bootstrap
519520
# Copy files to /var/runtime to support deploying as a Docker image
@@ -537,6 +538,7 @@ FROM isolation as fpm
537538
COPY --link --from=fpm-extension /bref-layer /opt
538539

539540
COPY --link layers/fpm/bref.ini /opt/bref/etc/php/conf.d/
541+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
540542

541543
COPY --link layers/fpm/bootstrap.sh /opt/bootstrap
542544
# Copy files to /var/runtime to support deploying as a Docker image

php-81/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ COPY --link layers/bootstrap.php /opt/bref/bootstrap.php
536536
FROM isolation as function
537537

538538
COPY --link layers/function/bref.ini /opt/bref/etc/php/conf.d/
539+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
539540

540541
COPY --link layers/function/bootstrap.sh /opt/bootstrap
541542
# Copy files to /var/runtime to support deploying as a Docker image
@@ -559,6 +560,7 @@ FROM isolation as fpm
559560
COPY --link --from=fpm-extension /bref-layer /opt
560561

561562
COPY --link layers/fpm/bref.ini /opt/bref/etc/php/conf.d/
563+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
562564

563565
COPY --link layers/fpm/bootstrap.sh /opt/bootstrap
564566
# Copy files to /var/runtime to support deploying as a Docker image

php-82/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ COPY --link layers/bootstrap.php /opt/bref/bootstrap.php
536536
FROM isolation as function
537537

538538
COPY --link layers/function/bref.ini /opt/bref/etc/php/conf.d/
539+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
539540

540541
COPY --link layers/function/bootstrap.sh /opt/bootstrap
541542
# Copy files to /var/runtime to support deploying as a Docker image
@@ -559,6 +560,7 @@ FROM isolation as fpm
559560
COPY --link --from=fpm-extension /bref-layer /opt
560561

561562
COPY --link layers/fpm/bref.ini /opt/bref/etc/php/conf.d/
563+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
562564

563565
COPY --link layers/fpm/bootstrap.sh /opt/bootstrap
564566
# Copy files to /var/runtime to support deploying as a Docker image

php-83/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ COPY --link layers/bootstrap.php /opt/bref/bootstrap.php
536536
FROM isolation as function
537537

538538
COPY --link layers/function/bref.ini /opt/bref/etc/php/conf.d/
539+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
539540

540541
COPY --link layers/function/bootstrap.sh /opt/bootstrap
541542
# Copy files to /var/runtime to support deploying as a Docker image
@@ -559,6 +560,7 @@ FROM isolation as fpm
559560
COPY --link --from=fpm-extension /bref-layer /opt
560561

561562
COPY --link layers/fpm/bref.ini /opt/bref/etc/php/conf.d/
563+
COPY --link layers/opcache.ini /opt/bref/etc/php/conf.d/
562564

563565
COPY --link layers/fpm/bootstrap.sh /opt/bootstrap
564566
# Copy files to /var/runtime to support deploying as a Docker image

0 commit comments

Comments
 (0)