Skip to content

Commit e371680

Browse files
committed
Drop --with-pear with PHP 8.6
see #1554
1 parent a4c405f commit e371680

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Dockerfile-linux.template

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
env.variant == "zts" # only needed for ZTS builds
2929
and is_alpine
3030
and IN(rcVersion; "8.2")
31+
;
32+
def install_pear_pecl:
33+
# https://github.com/docker-library/php/issues/1554
34+
IN(rcVersion; "8.2", "8.3", "8.4", "8.5")
3135
-}}
3236
FROM {{ env.from }}
3337

@@ -350,8 +354,10 @@ RUN set -eux; \
350354
# https://github.com/docker-library/php/issues/822
351355
--with-pic \
352356
\
357+
{{ if install_pear_pecl then ( -}}
353358
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
354359
--enable-mbstring \
360+
{{ ) else "" end -}}
355361
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
356362
--enable-mysqlnd \
357363
# https://wiki.php.net/rfc/argon2_password_hash
@@ -377,9 +383,11 @@ RUN set -eux; \
377383
--disable-phpdbg \
378384
{{ ) end -}}
379385
\
386+
{{ if install_pear_pecl then ( -}}
380387
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
381388
--with-pear \
382389
\
390+
{{ ) else "" end -}}
383391
{{ if rcVersion | IN("8.2") then ( -}}
384392
# bundled pcre does not support JIT on riscv64 until 10.41 (php 8.3+)
385393
# https://github.com/PCRE2Project/pcre2/commits/pcre2-10.41/src/sljit/sljitNativeRISCV_64.c
@@ -476,10 +484,12 @@ RUN set -eux; \
476484
{{ clean_apt }}; \
477485
{{ ) end -}}
478486
\
487+
{{ if install_pear_pecl then ( -}}
479488
# update pecl channel definitions https://github.com/docker-library/php/issues/443
480489
pecl update-channels; \
481490
rm -rf /tmp/pear ~/.pearrc; \
482491
\
492+
{{ ) else "" end -}}
483493
# smoke test
484494
php --version
485495

0 commit comments

Comments
 (0)