Skip to content

Commit

Permalink
PHP 8.3 with Imagick from master (#162)
Browse files Browse the repository at this point in the history
* Add PHP 8.3 to test workflow

* Install Imagick PECL module from source

* Build PHP 8.3 images
  • Loading branch information
youwe-petervanderwal authored May 22, 2024
1 parent da57bb0 commit 118ec95
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- { tag: 'v3.1', php: '8.2', distro: bookworm, version-override: "", latest-tag: false }
- { tag: 'v3.2', php: '8.2', distro: bookworm, version-override: "", latest-tag: true }
- { tag: '3.x', php: '8.2', distro: bookworm, version-override: "v3-dev", latest-tag: false }
- { tag: '3.x', php: '8.3', distro: bookworm, version-override: "v3-dev", latest-tag: false }

steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2' ]
php: [ '8.2', '8.3' ]
distro: [ bookworm ]
steps:
- uses: actions/checkout@v2
Expand All @@ -26,6 +26,11 @@ jobs:
for imageVariant in ${imageVariants[@]}; do
docker build --tag pimcore-image --target="pimcore_php_$imageVariant" --build-arg PHP_VERSION="${{ matrix.php }}" --build-arg DEBIAN_VERSION="${{ matrix.distro }}" .
if [ "$imageVariant" != "min" ]; then
# Test that Imagick is installed
docker run --rm pimcore-image sh -c 'php -m | grep imagick'
fi
if [ "$imageVariant" == "debug" ]; then
# Make sure xdebug is installed and configured on debug-build
docker run --rm pimcore-image sh -c 'php -m | grep xdebug'
Expand Down
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,24 @@ RUN set -eux; \
\
pecl install -f \
apcu \
imagick \
# imagick \
redis \
; \
docker-php-ext-enable \
apcu \
imagick \
# imagick \
redis \
; \
\
# Install Imagick from source as long as no official version compatible with PHP 8.3 is released yet
# See https://github.com/Imagick/imagick/issues/640
# Delete and uncomment imagick in the pecl install above when an official version is released
mkdir -p /usr/src/php/ext/imagick; \
# Locking on specific commit hash to provide consistent results, at the moment of writing this is the HEAD of master
curl -fsSL https://github.com/Imagick/imagick/archive/28f27044e435a2b203e32675e942eb8de620ee58.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \
docker-php-ext-install imagick; \
# End install Imagick from source
\
build-cleanup.sh; \
\
ldconfig /usr/local/lib; \
Expand Down

0 comments on commit 118ec95

Please sign in to comment.