From 349d43fe57a17f5a9c71abb2aa113a573250b36b Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 21 Feb 2024 21:46:16 +0000 Subject: [PATCH] Update min PHP testing version from PHP 7.4 to 8.1 - PHP 7.4 and 8.0 has been EOL - See go/drop-php-8.0 for more details --- examples/php/echo/apache.Dockerfile | 2 +- examples/php/echo/base.Dockerfile | 2 +- examples/php/echo/cli.Dockerfile | 2 +- examples/php/echo/fpm.Dockerfile | 2 +- src/php/docker/alpine/Dockerfile | 2 +- src/php/docker/grpc-ext/Dockerfile | 2 +- src/php/docker/grpc-src/Dockerfile | 2 +- src/php/docker/i386/Dockerfile | 2 +- src/php/docker/php-src/Dockerfile | 2 +- src/php/docker/php-zts/Dockerfile | 2 +- .../src/php/docker/php-src/Dockerfile.template | 2 +- tools/buildgen/plugins/expand_version.py | 2 +- .../helper_scripts/prepare_build_macos_rc | 13 ++++++------- 13 files changed, 18 insertions(+), 19 deletions(-) diff --git a/examples/php/echo/apache.Dockerfile b/examples/php/echo/apache.Dockerfile index a9c20d9439e..3a670f1c699 100644 --- a/examples/php/echo/apache.Dockerfile +++ b/examples/php/echo/apache.Dockerfile @@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer FROM grpc-php/base as grpc-base -FROM php:7.4-apache-buster +FROM php:8.1-apache-buster RUN apt-get -qq update && apt-get -qq install -y git diff --git a/examples/php/echo/base.Dockerfile b/examples/php/echo/base.Dockerfile index 33c0422897b..c1709c2de6d 100644 --- a/examples/php/echo/base.Dockerfile +++ b/examples/php/echo/base.Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:7.4-buster +FROM php:8.1-buster RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake cmake curl git libtool \ diff --git a/examples/php/echo/cli.Dockerfile b/examples/php/echo/cli.Dockerfile index 7b067744471..80eb168083c 100644 --- a/examples/php/echo/cli.Dockerfile +++ b/examples/php/echo/cli.Dockerfile @@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer FROM grpc-php/base as grpc-base -FROM php:7.4-buster +FROM php:8.1-buster RUN apt-get -qq update && apt-get -qq install -y git diff --git a/examples/php/echo/fpm.Dockerfile b/examples/php/echo/fpm.Dockerfile index be2aad50346..7ace7bb39b8 100644 --- a/examples/php/echo/fpm.Dockerfile +++ b/examples/php/echo/fpm.Dockerfile @@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer FROM grpc-php/base as grpc-base -FROM php:7.4-fpm-buster +FROM php:8.1-fpm-buster RUN apt-get -qq update && apt-get -qq install -y git diff --git a/src/php/docker/alpine/Dockerfile b/src/php/docker/alpine/Dockerfile index 0d22f83023a..e483c442d61 100644 --- a/src/php/docker/alpine/Dockerfile +++ b/src/php/docker/alpine/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:7.4-alpine3.15 +FROM php:8.1-alpine3.15 RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers diff --git a/src/php/docker/grpc-ext/Dockerfile b/src/php/docker/grpc-ext/Dockerfile index 9d8aac7be6a..f93eab9d719 100644 --- a/src/php/docker/grpc-ext/Dockerfile +++ b/src/php/docker/grpc-ext/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:7.4-buster +FROM php:8.1-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ diff --git a/src/php/docker/grpc-src/Dockerfile b/src/php/docker/grpc-src/Dockerfile index a099b73a38d..2efb609776e 100644 --- a/src/php/docker/grpc-src/Dockerfile +++ b/src/php/docker/grpc-src/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:7.4-buster +FROM php:8.1-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ diff --git a/src/php/docker/i386/Dockerfile b/src/php/docker/i386/Dockerfile index ab8da51af98..7a1908b4aa1 100644 --- a/src/php/docker/i386/Dockerfile +++ b/src/php/docker/i386/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM i386/php:7.4 +FROM i386/php:8.1 RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ diff --git a/src/php/docker/php-src/Dockerfile b/src/php/docker/php-src/Dockerfile index a6f4fc9d5da..25004ea909b 100644 --- a/src/php/docker/php-src/Dockerfile +++ b/src/php/docker/php-src/Dockerfile @@ -34,7 +34,7 @@ ARG MAKEFLAGS=-j8 RUN git clone https://github.com/php/php-src . -RUN git checkout php-7.4.33 && \ +RUN git checkout php-8.1.27 && \ ./buildconf --force && \ ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal \ --enable-debug --enable-pcntl \ diff --git a/src/php/docker/php-zts/Dockerfile b/src/php/docker/php-zts/Dockerfile index ab817e8de6c..804d8638b93 100644 --- a/src/php/docker/php-zts/Dockerfile +++ b/src/php/docker/php-zts/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:7.4-zts-buster +FROM php:8.1-zts-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ diff --git a/templates/src/php/docker/php-src/Dockerfile.template b/templates/src/php/docker/php-src/Dockerfile.template index 87c7d1e9426..3c1ae4cedd1 100644 --- a/templates/src/php/docker/php-src/Dockerfile.template +++ b/templates/src/php/docker/php-src/Dockerfile.template @@ -33,7 +33,7 @@ RUN git clone https://github.com/php/php-src . - RUN git checkout php-7.4.33 && ${'\\'} + RUN git checkout php-8.1.27 && ${'\\'} ./buildconf --force && ${'\\'} ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal ${'\\'} --enable-debug --enable-pcntl ${'\\'} diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index ddf53eabdc2..6877d1d0ee6 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -106,7 +106,7 @@ class Version: return "%d.%d.%d" % (self.major, self.minor, self.patch) def php_current_version(self): - return "7.4" + return "8.1" def php_debian_version(self): return "buster" diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index a0d9c285242..3865beb29e0 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -196,16 +196,15 @@ fi if [ "${PREPARE_BUILD_INSTALL_DEPS_PHP}" == "true" ] then - # php7.4 should already be installed on kokoro monterey image, so this should be instantaneous. - time brew install php@7.4 || true - export LDFLAGS="-L/usr/local/opt/php@7.4/lib ${LDFLAGS}" - export CPPFLAGS="-I/usr/local/opt/php@7.4/include ${CPPFLAGS}" - export PATH="/usr/local/opt/php@7.4/bin:/usr/local/opt/php@7.4/sbin:${PATH}" + time brew install php@8.1 || true + export LDFLAGS="-L/usr/local/opt/php@8.1/lib ${LDFLAGS}" + export CPPFLAGS="-I/usr/local/opt/php@8.1/include ${CPPFLAGS}" + export PATH="/usr/local/opt/php@8.1/bin:/usr/local/opt/php@8.1/sbin:${PATH}" - # the exit code from "brew install php@7.4" is useless + # the exit code from "brew install php@8.1" is useless # so instead we check if PHP was indeed installed successfully. # Failing early is better than cryptic errors later in the build process. - /usr/local/opt/php@7.4/bin/php --version + /usr/local/opt/php@8.1/bin/php --version # Workaround for https://github.com/Homebrew/homebrew-core/issues/41081 mkdir -p /usr/local/lib/php/pecl