Skip to content

Commit

Permalink
Merge pull request #125 from chialab/php-8.4
Browse files Browse the repository at this point in the history
feat: php 8.4
  • Loading branch information
le0m authored Nov 27, 2024
2 parents 82379d4 + fe1dea0 commit 487ff53
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
run: 'docker pull localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }} && make -C dev test'

- name: Build PCOV image for testing
if: ${{ matrix.version >= 7.1 }}
if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }}
uses: docker/build-push-action@v5
with:
cache-to: type=inline
Expand All @@ -88,7 +88,7 @@ jobs:
push: true

- name: Test PCOV image
if: ${{ matrix.version >= 7.1 }}
if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }}
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}${{ matrix.flavor }}
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
push: true

- name: Build PCOV image and push to registry
if: ${{ matrix.version >= 7.1 }}
if: ${{ matrix.version >= 7.1 && matrix.version < 8.4 }}
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
exif \
gd \
gettext \
imagick \
intl \
ldap \
memcached \
Expand All @@ -47,11 +48,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
5.6.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt mysql";; \
7.0.*|7.1.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt";; \
esac \
# Install Imagick from master on PHP >= 8.3, because imagick 3.7.0 broke on latest PHP releases and Imagick maintainers don't care to tag a newer release
&& if [ $(php -r 'echo PHP_VERSION_ID;') -lt 80300 ]; then \
PHP_EXTENSIONS="$PHP_EXTENSIONS imagick"; \
else PHP_EXTENSIONS="$PHP_EXTENSIONS https://api.github.com/repos/Imagick/imagick/tarball/28f27044e435a2b203e32675e942eb8de620ee58"; \
fi \
&& install-php-extensions $PHP_EXTENSIONS \
&& if command -v a2enmod; then a2enmod rewrite; fi
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apk add --no-cache \
exif \
gd \
gettext \
imagick \
intl \
ldap \
memcached \
Expand All @@ -39,11 +40,6 @@ RUN apk add --no-cache \
5.6.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt mysql";; \
7.0.*|7.1.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt";; \
esac \
# Install Imagick from master on PHP >= 8.3, because imagick 3.7.0 broke on latest PHP releases and Imagick maintainers don't care to tag a newer release
&& if [ $(php -r 'echo PHP_VERSION_ID;') -lt 80300 ]; then \
PHP_EXTENSIONS="$PHP_EXTENSIONS imagick"; \
else PHP_EXTENSIONS="$PHP_EXTENSIONS https://api.github.com/repos/Imagick/imagick/tarball/28f27044e435a2b203e32675e942eb8de620ee58"; \
fi \
&& install-php-extensions $PHP_EXTENSIONS \
&& if command -v a2enmod; then a2enmod rewrite; fi

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ EXTENSIONS := \
xsl \
zip \
sockets
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ For development environments, you might want to choose an [image with XDebug ins
- `8.3`
- `8.3-apache`
- `8.3-fpm`
- `8.4`
- `8.4-apache`
- `8.4-fpm`

As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance.

Expand Down
8 changes: 6 additions & 2 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ ARG BASE_IMAGE=chialab/php:latest
FROM ${BASE_IMAGE}
LABEL maintainer="[email protected]"

# Install XDebug.
RUN install-php-extensions xdebug
# Install XDebug. Use beta version for PHP 8.4
RUN if [ $(php-config --vernum) -lt 80400 ]; then \
install-php-extensions xdebug; \
else \
install-php-extensions xdebug-beta; \
fi
4 changes: 2 additions & 2 deletions dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ EXTENSIONS := \
xsl \
zip \
sockets
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
Expand Down
3 changes: 3 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ For more production-like environments, you might want to choose an [image *witho
- `8.3`
- `8.3-apache`
- `8.3-fpm`
- `8.4`
- `8.4-apache`
- `8.4-fpm`

As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance.

Expand Down
2 changes: 1 addition & 1 deletion pcov/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EXTENSIONS := \
xsl \
zip \
sockets
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
Expand Down
3 changes: 3 additions & 0 deletions pcov/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ For more production-like environments, you might want to choose an [image *witho
- `8.3`
- `8.3-apache`
- `8.3-fpm`
- `8.4`
- `8.4-apache`
- `8.4-fpm`

As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance.

Expand Down
4 changes: 2 additions & 2 deletions xhprof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ EXTENSIONS := \
xhprof \
xsl \
zip
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 latest alpine))
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 latest alpine))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
Expand Down
3 changes: 3 additions & 0 deletions xhprof/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ For more production-like environments, you might want to choose an [image *witho
- `8.3`
- `8.3-apache`
- `8.3-fpm`
- `8.4`
- `8.4-apache`
- `8.4-fpm`

As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance.

Expand Down

0 comments on commit 487ff53

Please sign in to comment.