diff --git a/examples/php/echo/apache.Dockerfile b/examples/php/echo/apache.Dockerfile index 10cef4895b3..a9c20d9439e 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.2-apache-stretch +FROM php:7.4-apache-buster RUN apt-get -qq update && apt-get -qq install -y git @@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \ /usr/local/bin/protoc-gen-grpc COPY --from=grpc-base \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \ + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so RUN docker-php-ext-enable grpc diff --git a/examples/php/echo/base.Dockerfile b/examples/php/echo/base.Dockerfile index dac601c21cd..33c0422897b 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.2-stretch +FROM php:7.4-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 6dcf07acac1..7b067744471 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.2-stretch +FROM php:7.4-buster RUN apt-get -qq update && apt-get -qq install -y git @@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \ /usr/local/bin/protoc-gen-grpc COPY --from=grpc-base \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \ + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so RUN docker-php-ext-enable grpc diff --git a/examples/php/echo/fpm.Dockerfile b/examples/php/echo/fpm.Dockerfile index d9b4e790f9d..be2aad50346 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.2-fpm-stretch +FROM php:7.4-fpm-buster RUN apt-get -qq update && apt-get -qq install -y git @@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \ /usr/local/bin/protoc-gen-grpc COPY --from=grpc-base \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \ + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so RUN docker-php-ext-enable grpc diff --git a/examples/php/greeter_server.php b/examples/php/greeter_server.php index 684d6c63943..3a0460e9c10 100644 --- a/examples/php/greeter_server.php +++ b/examples/php/greeter_server.php @@ -26,13 +26,16 @@ class Greeter extends Helloworld\GreeterStub \Grpc\ServerContext $serverContext ): ?\Helloworld\HelloReply { $name = $request->getName(); + echo 'Received request: ' . $name . PHP_EOL; $response = new \Helloworld\HelloReply(); $response->setMessage("Hello " . $name); return $response; } } +$port = 50051; $server = new \Grpc\RpcServer(); -$server->addHttp2Port('0.0.0.0:50051'); +$server->addHttp2Port('0.0.0.0:'.$port); $server->handle(new Greeter()); +echo 'Listening on port :' . $port . PHP_EOL; $server->run(); diff --git a/src/php/bin/build_all_docker_images.sh b/src/php/bin/build_all_docker_images.sh index e75673d1583..0289f98edc9 100755 --- a/src/php/bin/build_all_docker_images.sh +++ b/src/php/bin/build_all_docker_images.sh @@ -16,7 +16,7 @@ set -e cd $(dirname $0)/../../.. -ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-future php-zts +ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-zts fork-support i386 php8 php8.2 ) if [[ "$1" == "--cmds" ]]; then @@ -36,5 +36,6 @@ fi set -x for arg in "${lst[@]}" do + echo "Building $arg..." docker build -t grpc-php/"$arg" -f ./src/php/docker/"$arg"/Dockerfile . done diff --git a/src/php/bin/run_all_docker_images.sh b/src/php/bin/run_all_docker_images.sh index d8ca92e5015..65cfa628d91 100755 --- a/src/php/bin/run_all_docker_images.sh +++ b/src/php/bin/run_all_docker_images.sh @@ -16,7 +16,7 @@ set -e cd $(dirname $0)/../../.. -ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-future php-zts +ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-zts fork-support i386 php8 php8.2 ) if [[ "$1" == "--cmds" ]]; then @@ -36,5 +36,6 @@ fi set -x for arg in "${lst[@]}" do + echo "Running $arg..." docker run -it --rm grpc-php/"$arg" done diff --git a/src/php/docker/alpine/Dockerfile b/src/php/docker/alpine/Dockerfile index 53422e845e1..0d22f83023a 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.2-alpine3.9 +FROM php:7.4-alpine3.15 RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers @@ -34,4 +34,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/centos7/Dockerfile b/src/php/docker/centos7/Dockerfile index c9fefa7c1ac..ae82aa7a335 100644 --- a/src/php/docker/centos7/Dockerfile +++ b/src/php/docker/centos7/Dockerfile @@ -23,8 +23,8 @@ SHELL [ "/usr/bin/scl", "enable", "devtoolset-7"] RUN yum install epel-release -y && \ rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \ - yum --enablerepo=remi-php72 install php -y && \ - yum-config-manager --enable remi-php72 > /dev/null && \ + yum --enablerepo=remi-php74 install php -y && \ + yum-config-manager --enable remi-php74 > /dev/null && \ yum install -y make wget which \ gmp-devel libmpc-devel mpfr-devel yum-utils \ php-devel php-fpm php-pear && \ @@ -48,4 +48,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/grpc-ext/Dockerfile b/src/php/docker/grpc-ext/Dockerfile index 03aad8f0509..9d8aac7be6a 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.2-stretch +FROM php:7.4-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ @@ -36,4 +36,10 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] +RUN curl -sS https://getcomposer.org/installer | php && \ + chmod +x composer.phar && \ + mv composer.phar /usr/local/bin/composer + +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/grpc-src/Dockerfile b/src/php/docker/grpc-src/Dockerfile index d2870bd8ed6..a099b73a38d 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.2-stretch +FROM php:7.4-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ @@ -43,4 +43,4 @@ RUN phpize && \ make install -CMD ["/github/grpc/src/php/bin/run_tests.sh"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--ignore-valgrind-undef-errors"] diff --git a/src/php/docker/i386/Dockerfile b/src/php/docker/i386/Dockerfile index e0b8ab41355..ab8da51af98 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.2 +FROM i386/php:7.4 RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ @@ -36,4 +36,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/php-future/Dockerfile b/src/php/docker/php-future/Dockerfile deleted file mode 100644 index a1148101bc2..00000000000 --- a/src/php/docker/php-future/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2019 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM php:7.4.11-buster - -RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ - autoconf automake git libtool pkg-config \ - valgrind wget zlib1g-dev - -ARG MAKEFLAGS=-j8 - - -WORKDIR /tmp - -RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \ - mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \ - chmod +x /usr/local/bin/phpunit - - -WORKDIR /github/grpc - -COPY . . - -RUN pear package && \ - find . -name grpc-*.tgz | xargs -I{} pecl install {} - - -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] diff --git a/src/php/docker/php-src/Dockerfile b/src/php/docker/php-src/Dockerfile index 4d0bbf9655b..a6f4fc9d5da 100644 --- a/src/php/docker/php-src/Dockerfile +++ b/src/php/docker/php-src/Dockerfile @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:stretch +FROM debian:buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ - autoconf build-essential git libtool \ - libcurl4-openssl-dev libedit-dev libsodium-dev \ - libssl-dev libxml2-dev \ - pkg-config valgrind wget zlib1g-dev + autoconf bison build-essential git libtool \ + libcurl4-openssl-dev libedit-dev libonig-dev libsodium-dev \ + libsqlite3-dev libssl-dev libxml2-dev \ + pkg-config re2c valgrind wget zlib1g-dev WORKDIR /tmp @@ -28,25 +28,19 @@ RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \ chmod +x /usr/local/bin/phpunit -RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && \ - tar -zxvf bison-3.4.2.tar.gz && \ - cd bison-3.4.2 && \ - ./configure && make && make install - - WORKDIR /github/php-src ARG MAKEFLAGS=-j8 RUN git clone https://github.com/php/php-src . -RUN git checkout php-7.2.22 && \ +RUN git checkout php-7.4.33 && \ ./buildconf --force && \ ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal \ --enable-debug --enable-pcntl \ --enable-ftp --enable-mbstring --enable-mysqlnd \ --with-curl --with-libedit --with-mhash --with-openssl \ - --with-sodium=shared --with-zlib && \ + --with-pear --with-sodium=shared --with-zlib && \ make && make install @@ -58,4 +52,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/php-zts/Dockerfile b/src/php/docker/php-zts/Dockerfile index c7e6ea50799..ab817e8de6c 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.2-zts-stretch +FROM php:7.4-zts-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ @@ -36,4 +36,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/php8.2/Dockerfile b/src/php/docker/php8.2/Dockerfile index 61b8117567c..2706803dd75 100644 --- a/src/php/docker/php8.2/Dockerfile +++ b/src/php/docker/php8.2/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:8.2.0RC4-zts-buster +FROM php:8.2.0RC7-zts-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ @@ -23,12 +23,6 @@ ARG MAKEFLAGS=-j8 WORKDIR /tmp -# install pear -RUN apt-get install expect -y && \ - curl -LO http://pear.php.net/go-pear.phar && \ - expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && \ - rm go-pear.phar - RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && \ mv phpunit-9.5.9.phar /usr/local/bin/phpunit && \ chmod +x /usr/local/bin/phpunit @@ -42,4 +36,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/src/php/docker/php8/Dockerfile b/src/php/docker/php8/Dockerfile index d70b75d6263..2094c5062c6 100644 --- a/src/php/docker/php8/Dockerfile +++ b/src/php/docker/php8/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM php:8.0.0-zts-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 \ @@ -23,14 +23,8 @@ ARG MAKEFLAGS=-j8 WORKDIR /tmp -# install pear -RUN apt-get install expect -y && \ - curl -LO http://pear.php.net/go-pear.phar && \ - expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && \ - rm go-pear.phar - -RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \ - mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \ +RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && \ + mv phpunit-9.5.9.phar /usr/local/bin/phpunit && \ chmod +x /usr/local/bin/phpunit @@ -42,4 +36,6 @@ RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} -CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \ + "--ignore-valgrind-undef-errors"] + diff --git a/templates/examples/php/echo/copy_from_grpc_base.include b/templates/examples/php/echo/copy_from_grpc_base.include index f2e3d87ec69..55324e96f16 100644 --- a/templates/examples/php/echo/copy_from_grpc_base.include +++ b/templates/examples/php/echo/copy_from_grpc_base.include @@ -7,5 +7,5 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin ${'\\'} /usr/local/bin/protoc-gen-grpc COPY --from=grpc-base ${'\\'} - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so ${'\\'} - /usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so ${'\\'} + /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so diff --git a/templates/src/php/docker/alpine/Dockerfile.template b/templates/src/php/docker/alpine/Dockerfile.template index 10302b24e3b..b761a633712 100644 --- a/templates/src/php/docker/alpine/Dockerfile.template +++ b/templates/src/php/docker/alpine/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM php:${settings.php_version.php_current_version()}-alpine3.9 + FROM php:${settings.php_version.php_current_version()}-alpine3.15 RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers @@ -27,4 +27,4 @@ <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/centos7/Dockerfile.template b/templates/src/php/docker/centos7/Dockerfile.template index 47084bfddc2..b5b28645f60 100644 --- a/templates/src/php/docker/centos7/Dockerfile.template +++ b/templates/src/php/docker/centos7/Dockerfile.template @@ -25,8 +25,8 @@ RUN yum install epel-release -y && ${'\\'} rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && ${'\\'} rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && ${'\\'} - yum --enablerepo=remi-php72 install php -y && ${'\\'} - yum-config-manager --enable remi-php72 > /dev/null && ${'\\'} + yum --enablerepo=remi-php74 install php -y && ${'\\'} + yum-config-manager --enable remi-php74 > /dev/null && ${'\\'} yum install -y make wget which ${'\\'} gmp-devel libmpc-devel mpfr-devel yum-utils ${'\\'} php-devel php-fpm php-pear && ${'\\'} @@ -41,4 +41,4 @@ <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/dockerfile_cmd.include b/templates/src/php/docker/dockerfile_cmd.include new file mode 100644 index 00000000000..b7ace507032 --- /dev/null +++ b/templates/src/php/docker/dockerfile_cmd.include @@ -0,0 +1,2 @@ +CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", ${'\\'} + "--ignore-valgrind-undef-errors"] diff --git a/templates/src/php/docker/download_phpunit9.include b/templates/src/php/docker/download_phpunit9.include new file mode 100644 index 00000000000..ad883738844 --- /dev/null +++ b/templates/src/php/docker/download_phpunit9.include @@ -0,0 +1,3 @@ +RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && ${'\\'} + mv phpunit-9.5.9.phar /usr/local/bin/phpunit && ${'\\'} + chmod +x /usr/local/bin/phpunit diff --git a/templates/src/php/docker/grpc-ext/Dockerfile.template b/templates/src/php/docker/grpc-ext/Dockerfile.template index c03ac678fb4..8b4b9e000f9 100644 --- a/templates/src/php/docker/grpc-ext/Dockerfile.template +++ b/templates/src/php/docker/grpc-ext/Dockerfile.template @@ -29,4 +29,8 @@ <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] + RUN curl -sS https://getcomposer.org/installer | php && ${'\\'} + chmod +x composer.phar && ${'\\'} + mv composer.phar /usr/local/bin/composer + + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/grpc-src/Dockerfile.template b/templates/src/php/docker/grpc-src/Dockerfile.template index b891f90c1f2..40a2ab1da1e 100644 --- a/templates/src/php/docker/grpc-src/Dockerfile.template +++ b/templates/src/php/docker/grpc-src/Dockerfile.template @@ -42,4 +42,4 @@ make install - CMD ["/github/grpc/src/php/bin/run_tests.sh"] + CMD ["/github/grpc/src/php/bin/run_tests.sh", "--ignore-valgrind-undef-errors"] diff --git a/templates/src/php/docker/i386/Dockerfile.template b/templates/src/php/docker/i386/Dockerfile.template index f277c676801..0c498fe6db3 100644 --- a/templates/src/php/docker/i386/Dockerfile.template +++ b/templates/src/php/docker/i386/Dockerfile.template @@ -29,4 +29,4 @@ <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/php-src/Dockerfile.template b/templates/src/php/docker/php-src/Dockerfile.template index 548872fde6e..87c7d1e9426 100644 --- a/templates/src/php/docker/php-src/Dockerfile.template +++ b/templates/src/php/docker/php-src/Dockerfile.template @@ -17,38 +17,32 @@ FROM debian:${settings.php_version.php_debian_version()} RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'} - autoconf build-essential git libtool ${'\\'} - libcurl4-openssl-dev libedit-dev libsodium-dev ${'\\'} - libssl-dev libxml2-dev ${'\\'} - pkg-config valgrind wget zlib1g-dev + autoconf bison build-essential git libtool ${'\\'} + libcurl4-openssl-dev libedit-dev libonig-dev libsodium-dev ${'\\'} + libsqlite3-dev libssl-dev libxml2-dev ${'\\'} + pkg-config re2c valgrind wget zlib1g-dev WORKDIR /tmp <%include file="../download_phpunit.include" /> - RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && ${'\\'} - tar -zxvf bison-3.4.2.tar.gz && ${'\\'} - cd bison-3.4.2 && ${'\\'} - ./configure && make && make install - - WORKDIR /github/php-src ARG MAKEFLAGS=-j8 RUN git clone https://github.com/php/php-src . - RUN git checkout php-7.2.22 && ${'\\'} + RUN git checkout php-7.4.33 && ${'\\'} ./buildconf --force && ${'\\'} ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal ${'\\'} --enable-debug --enable-pcntl ${'\\'} --enable-ftp --enable-mbstring --enable-mysqlnd ${'\\'} --with-curl --with-libedit --with-mhash --with-openssl ${'\\'} - --with-sodium=shared --with-zlib && ${'\\'} + --with-pear --with-sodium=shared --with-zlib && ${'\\'} make && make install <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/php-zts/Dockerfile.template b/templates/src/php/docker/php-zts/Dockerfile.template index 92e114418bb..cddcaaddb10 100644 --- a/templates/src/php/docker/php-zts/Dockerfile.template +++ b/templates/src/php/docker/php-zts/Dockerfile.template @@ -29,4 +29,4 @@ <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/php-future/Dockerfile.template b/templates/src/php/docker/php8.2/Dockerfile.template similarity index 79% rename from templates/src/php/docker/php-future/Dockerfile.template rename to templates/src/php/docker/php8.2/Dockerfile.template index d9da397a049..3ee8e52ba2f 100644 --- a/templates/src/php/docker/php-future/Dockerfile.template +++ b/templates/src/php/docker/php8.2/Dockerfile.template @@ -1,6 +1,6 @@ %YAML 1.2 --- | - # Copyright 2019 gRPC authors. + # Copyright 2020 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM php:7.4.11-buster + FROM php:8.2.0RC7-zts-buster RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'} autoconf automake git libtool pkg-config ${'\\'} @@ -25,8 +25,8 @@ WORKDIR /tmp - <%include file="../download_phpunit.include" /> + <%include file="../download_phpunit9.include" /> <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] + <%include file="../dockerfile_cmd.include" /> diff --git a/templates/src/php/docker/php8/Dockerfile.template b/templates/src/php/docker/php8/Dockerfile.template index 7df1d576673..558d15d947a 100644 --- a/templates/src/php/docker/php8/Dockerfile.template +++ b/templates/src/php/docker/php8/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM php:8.0.0-zts-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 ${'\\'} @@ -25,14 +25,8 @@ WORKDIR /tmp - # install pear - RUN apt-get install expect -y && ${'\\'} - curl -LO http://pear.php.net/go-pear.phar && ${'\\'} - expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && ${'\\'} - rm go-pear.phar - - <%include file="../download_phpunit.include" /> + <%include file="../download_phpunit9.include" /> <%include file="../pecl_ext_build_src.include" /> - CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] + <%include file="../dockerfile_cmd.include" /> diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index 7958dd41fb2..fc70e9323be 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -101,10 +101,10 @@ class Version: return '%d.%d.%d' % (self.major, self.minor, self.patch) def php_current_version(self): - return '7.2' + return '7.4' def php_debian_version(self): - return 'stretch' + return 'buster' def mako_plugin(dictionary):