From 74279feed7710ba89f20baa10ace98e9f532abba Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Thu, 15 Dec 2022 20:13:33 +0800 Subject: [PATCH] PHP 8.2 tokenizer ext default available --- php-worker/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 17959f94..14a0ea2e 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -39,8 +39,9 @@ RUN apk --update add wget \ RUN pecl channel-update pecl.php.net; \ docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \ - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \ - php -m | grep -q 'tokenizer'; \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80100" ] || \ + [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80200" ]; then \ + php -m | grep -oiE '^tokenizer$'; \ else \ docker-php-ext-install tokenizer; \ fi