Skip to content

Commit

Permalink
Add PHP 8.3, drop 8.0, update extensions
Browse files Browse the repository at this point in the history
Extensions updates
xdebug 3.3.0
apcu 1.5.23
mongodb 1.17.1
brotli 0.14.2
amqp 2.1.1 (from 1.x)
ast 1.1.1
igbinary 3.2.15
smbclient 1.1.1

PHP 8.3 comes without newrelic, ds and imagick #187

closes #185
closes #186
  • Loading branch information
csandanov committed Dec 7, 2023
1 parent 4382068 commit a28e506
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 91 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ on:
pull_request:

env:
PHP83: '8.3.0'
PHP82: '8.2.13'
PHP81: '8.1.26'
PHP80: '8.0.30'
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
php82:
php83:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -31,11 +31,11 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP82 }}
tags: 8.2,8,latest
version: ${{ env.PHP83 }}
tags: 8.3,8,latest
workdir: 8
platform: linux/amd64,linux/arm64
php81:
php82:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -48,11 +48,11 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP81 }}
tags: 8.1
version: ${{ env.PHP82 }}
tags: 8.2
workdir: 8
platform: linux/amd64,linux/arm64
php80:
php81:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -65,12 +65,12 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP80 }}
tags: '8.0'
version: ${{ env.PHP81 }}
tags: 8.1
workdir: 8
platform: linux/amd64,linux/arm64
### dev
php82-dev:
php83-dev:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -83,12 +83,12 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP82 }}
version: ${{ env.PHP83 }}
dev: 1
tags: 8.2-dev,8-dev,dev
tags: 8.3-dev,8-dev,dev
workdir: 8
platform: linux/amd64,linux/arm64
php81-dev:
php82-dev:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -101,12 +101,12 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP81 }}
version: ${{ env.PHP82 }}
dev: 1
tags: 8.1-dev
tags: 8.2-dev
workdir: 8
platform: linux/amd64,linux/arm64
php80-dev:
php81-dev:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -119,13 +119,13 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP80 }}
version: ${{ env.PHP81 }}
dev: 1
tags: 8.0-dev
tags: 8.1-dev
workdir: 8
platform: linux/amd64,linux/arm64
### dev-macos
php82-dev-macos:
php83-dev-macos:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -138,14 +138,14 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP82 }}
version: ${{ env.PHP83 }}
dev: 1
user_id: 501
group_id: 20
tags: 8.2-dev-macos,8-dev-macos,dev-macos
tags: 8.3-dev-macos,8-dev-macos,dev-macos
workdir: 8
platform: linux/amd64,linux/arm64
php81-dev-macos:
php82-dev-macos:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -158,14 +158,14 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP81 }}
version: ${{ env.PHP82 }}
dev: 1
user_id: 501
group_id: 20
tags: 8.1-dev-macos
tags: 8.2-dev-macos
workdir: 8
platform: linux/amd64,linux/arm64
php80-dev-macos:
php81-dev-macos:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -178,10 +178,10 @@ jobs:
- uses: docker/setup-buildx-action@v1
- uses: ./.github/actions
with:
version: ${{ env.PHP80 }}
version: ${{ env.PHP81 }}
dev: 1
user_id: 501
group_id: 20
tags: 8.0-dev-macos
tags: 8.1-dev-macos
workdir: 8
platform: linux/amd64,linux/arm64
4 changes: 2 additions & 2 deletions .php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
8.3.0#2023-11-28T03:57:17.87134Z
8.2.13#2023-11-28T03:57:17.87134Z
8.1.26#2023-11-28T03:52:05.959942Z
8.0.30#2023-11-22T06:12:09.806534Z
8.1.26#2023-11-28T03:52:05.959942Z
54 changes: 26 additions & 28 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ RUN set -xe; \
docker-php-ext-configure gd \
--with-webp \
--with-freetype \
$(test "${PHP_VERSION:0:3}" != "8.0" && echo '--with-avif') \
--with-avif \
--with-jpeg; \
NPROC=$(getconf _NPROCESSORS_ONLN); \
docker-php-ext-install "-j${NPROC}" gd; \
Expand Down Expand Up @@ -213,37 +213,37 @@ RUN set -xe; \
rm ./*.apk; \
\
pecl install \
apcu-5.1.22 \
amqp-1.11.0 \
ast-1.1.0 \
ds-1.4.0 \
apcu-5.1.23 \
amqp-2.1.1 \
ast-1.1.1 \
$(test "${PHP_VERSION:0:3}" != "8.3" && echo 'ds 1.4.0') \
event-3.0.8 \
# grpc-1.34.0 \
igbinary-3.2.14 \
imagick-3.7.0 \
igbinary-3.2.15 \
$(test "${PHP_VERSION:0:3}" != "8.3" && echo 'imagick-3.7.0') \
memcached-3.2.0 \
mongodb-1.15.1 \
mongodb-1.17.1 \
oauth-2.0.7 \
pdo_sqlsrv-5.11.1 \
pcov \
rdkafka-6.0.3 \
redis-5.3.7 \
sqlsrv-5.11.1 \
smbclient-1.0.6 \
smbclient-1.1.1 \
uploadprogress-2.0.2 \
uuid-1.2.0 \
xdebug-3.2.2 \
xdebug-3.3.0 \
xhprof-2.3.9 \
yaml-2.2.3; \
\
docker-php-ext-enable \
apcu \
amqp \
ast \
ds \
$(test "${PHP_VERSION:0:3}" != "8.3" && echo 'ds') \
event \
igbinary \
imagick \
$(test "${PHP_VERSION:0:3}" != "8.3" && echo 'imagick') \
# grpc \
memcached \
mongodb \
Expand All @@ -260,28 +260,26 @@ RUN set -xe; \
xhprof \
yaml; \
\
if [[ "${PHP_VERSION:0:3}" == "8.0" ]]; then \
pecl install mcrypt-1.0.4; \
docker-php-ext-enable mcrypt; \
fi; \
# Event extension should be loaded after sockets.
# http://osmanov-dev-notes.blogspot.com/2013/07/fixing-php-start-up-error-unable-to.html
mv /usr/local/etc/php/conf.d/docker-php-ext-event.ini /usr/local/etc/php/conf.d/z-docker-php-ext-event.ini; \
\
# NewRelic extension and agent. \
newrelic_url="http://download.newrelic.com/php_agent/release/"; \
wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \
tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \
export NR_INSTALL_SILENT=true; \
export NR_INSTALL_USE_CP_NOT_LN=true; \
bash /tmp/newrelic/newrelic-install install; \
rm -f /usr/local/etc/php/conf.d/newrelic.ini; \
mkdir -p /var/log/newrelic/; \
chown -R www-data:www-data /var/log/newrelic/; \
chmod -R 775 /var/log/newrelic/; \
if [[ "${PHP_VERSION:0:3}" != "8.3" ]]; then \
# NewRelic extension and agent. \
newrelic_url="http://download.newrelic.com/php_agent/release/"; \
wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \
tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \
export NR_INSTALL_SILENT=true; \
export NR_INSTALL_USE_CP_NOT_LN=true; \
bash /tmp/newrelic/newrelic-install install; \
rm -f /usr/local/etc/php/conf.d/newrelic.ini; \
mkdir -p /var/log/newrelic/; \
chown -R www-data:www-data /var/log/newrelic/; \
chmod -R 775 /var/log/newrelic/; \
fi; \
\
# Brotli extension.
brotli_ext_ver="0.13.1"; \
brotli_ext_ver="0.14.2"; \
mkdir -p /usr/src/php/ext/brotli; \
brotli_url="https://github.com/kjdev/php-ext-brotli/archive/refs/tags/${brotli_ext_ver}.tar.gz"; \
wget -qO- "${brotli_url}" | tar xz --strip-components=1 -C /usr/src/php/ext/brotli; \
Expand Down
3 changes: 2 additions & 1 deletion 8/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-include env_make

PHP_VER ?= 8.2.13
PHP_VER ?= 8.3.0
PHP_VER_MINOR ?= $(shell echo "${PHP_VER}" | grep -oE '^[0-9]+\.[0-9]+')

REPO = wodby/php
Expand Down Expand Up @@ -102,6 +102,7 @@ logs:

clean:
-docker rm -f $(NAME)
-IMAGE=$(REPO):$(TAG) docker-compose -f tests/docker-compose.yml down

check-configs:
./check-configs.sh $(PHP_VER) $(PHP_VER_MINOR)
Expand Down
4 changes: 3 additions & 1 deletion 8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ process_templates() {
fi

# Extensions that don't work with --enabled-debug
_gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini"
if [[ "${php_ver_minor}" != "8.3" ]]; then
_gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini"
fi;

_gotpl "docker-php-${php_ver_minor}.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php.ini"
_gotpl "docker-php-ext-apcu.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ phar.cache_list = {{ getenv "PHP_PHAR_CACHE_LIST" "" }}

[mail function]
sendmail_path = {{ getenv "PHP_SENDMAIL_PATH" "/bin/true" }}
mail.mixed_lf_and_crlf = {{ getenv "PHP_MAIL_MIXED_LF_AND_CRLF" "Off" }}

[MySQLi]
mysqli.cache_size = {{ getenv "PHP_MYSQLI_CACHE_SIZE" "2000" }}
Expand Down
5 changes: 1 addition & 4 deletions 8/tests/php_modules/8.0 → 8/tests/php_modules/8.3
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ ctype
curl
date
dom
ds
event
exif
fileinfo
Expand All @@ -22,20 +21,17 @@ gmp
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libsmbclient
libxml
mbstring
mcrypt
memcached
mongodb
mysqli
mysqlnd
newrelic
OAuth
openssl
pcntl
Expand All @@ -49,6 +45,7 @@ pdo_sqlsrv
pgsql
Phar
posix
random
rdkafka
readline
redis
Expand Down
Loading

0 comments on commit a28e506

Please sign in to comment.