Merge pull request #20579 from HannahShiSFB/20523-phpunit5

PHP: change phpunit version from 4.8.36 to 5.7.27
pull/20599/head
Stanley Cheung 6 years ago committed by GitHub
commit acd09a1ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      examples/php/README.md
  2. 15
      src/php/README.md
  3. 24
      src/php/docker/README.md
  4. 4
      src/php/docker/alpine/Dockerfile
  5. 4
      src/php/docker/grpc-ext/Dockerfile
  6. 4
      src/php/docker/grpc-src/Dockerfile
  7. 4
      src/php/docker/php-future/Dockerfile
  8. 4
      src/php/docker/php-src/Dockerfile
  9. 4
      src/php/docker/php-zts/Dockerfile
  10. 4
      src/php/docker/php5/Dockerfile
  11. 4
      templates/src/php/docker/download_phpunit.include
  12. 6
      templates/tools/dockerfile/php_deps.include
  13. 6
      tools/dockerfile/distribtest/php_jessie_x64/Dockerfile
  14. 5
      tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
  15. 6
      tools/dockerfile/interoptest/grpc_interop_php/Dockerfile
  16. 6
      tools/dockerfile/test/php_jessie_x64/Dockerfile
  17. 5
      tools/gce/linux_kokoro_performance_worker_init.sh

@ -4,7 +4,7 @@ gRPC in 3 minutes (PHP)
PREREQUISITES PREREQUISITES
------------- -------------
This requires `php` >=5.5, `phpize`, `pecl`, `phpunit` This requires `php` >=5.5, `phpize`, `pecl`
INSTALL INSTALL
------- -------

@ -21,17 +21,17 @@ gRPC PHP installation instructions for Google Cloud Platform is in
For PHP5: For PHP5:
```sh ```sh
$ sudo apt-get install php5 php5-dev php-pear phpunit $ sudo apt-get install php5 php5-dev php-pear
``` ```
For PHP7: For PHP7:
```sh ```sh
$ sudo apt-get install php7.0 php7.0-dev php-pear phpunit $ sudo apt-get install php7.0 php7.0-dev php-pear
``` ```
or or
```sh ```sh
$ sudo apt-get install php php-dev php-pear phpunit $ sudo apt-get install php php-dev php-pear
``` ```
**Install PHP and PECL on CentOS/RHEL 7:** **Install PHP and PECL on CentOS/RHEL 7:**
@ -54,10 +54,13 @@ $ sudo mv composer.phar /usr/local/bin/composer
``` ```
**Install PHPUnit (Linux or Mac):** **Install PHPUnit (Linux or Mac):**
PHP tests currently require using an older version of PHPUnit
```sh ```sh
$ wget https://phar.phpunit.de/phpunit-old.phar $ wget https://phar.phpunit.de/phpunit-5.7.27.phar
$ chmod +x phpunit-old.phar $ chmod +x phpunit-5.7.27.phar
$ sudo mv phpunit-old.phar /usr/bin/phpunit $ sudo mv phpunit-5.7.27.phar /usr/local/bin/phpunit
``` ```
## Install the gRPC PHP extension ## Install the gRPC PHP extension

@ -7,31 +7,37 @@ different PHP environments.
## Build and Run Tests ## Build and Run Tests
```sh
$ cd grpc
```
To build all docker images: To build all docker images:
```sh ```sh
# cd grpc
$ ./src/php/bin/build_all_docker_images.sh $ ./src/php/bin/build_all_docker_images.sh
```
# or to only build some selected images Or to only build some selected images
```sh
$ ./src/php/bin/build_all_docker_images.sh grpc-ext php-src $ ./src/php/bin/build_all_docker_images.sh grpc-ext php-src
```
# or to only print out individual `docker build` commands Or to only print out individual `docker build` commands
```sh
$ ./src/php/bin/build_all_docker_images.sh --cmds $ ./src/php/bin/build_all_docker_images.sh --cmds
``` ```
To run all tests: To run all tests:
```sh ```sh
$ cd grpc
$ ./src/php/bin/run_all_docker_images.sh $ ./src/php/bin/run_all_docker_images.sh
```
# or to only run some selected images Or to only run some selected images
```sh
$ ./src/php/bin/run_all_docker_images.sh grpc-ext php-src $ ./src/php/bin/run_all_docker_images.sh grpc-ext php-src
```
# or to only print out individual `docker run` commands Or to only print out individual `docker run` commands
```sh
$ ./src/php/bin/run_all_docker_images.sh --cmds $ ./src/php/bin/run_all_docker_images.sh --cmds
``` ```

@ -19,8 +19,8 @@ RUN apk add autoconf g++ make zlib-dev git bash wget
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -21,8 +21,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -21,8 +21,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -21,8 +21,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -23,8 +23,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -21,8 +21,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -21,8 +21,8 @@ RUN apt-get -qq update && apt-get -qq install -y \
WORKDIR /tmp WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && \ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && \ mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -1,3 +1,3 @@
RUN wget https://phar.phpunit.de/phpunit-4.8.36.phar && ${'\\'} RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && ${'\\'}
mv phpunit-4.8.36.phar /usr/local/bin/phpunit && ${'\\'} mv phpunit-5.7.27.phar /usr/local/bin/phpunit && ${'\\'}
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit

@ -4,4 +4,8 @@
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y ${'\\'} RUN apt-get update && apt-get install -y ${'\\'}
git php5 php5-dev phpunit unzip git php5 php5-dev unzip
RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && ${'\\'}
mv phpunit-5.7.27.phar /usr/local/bin/phpunit && ${'\\'}
chmod +x /usr/local/bin/phpunit

@ -14,4 +14,8 @@
FROM debian:jessie FROM debian:jessie
RUN apt-get update && apt-get install -y php5 php5-dev php-pear phpunit RUN apt-get update && apt-get install -y php5 php5-dev php-pear wget
RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit

@ -67,8 +67,11 @@ RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
# PHP dependencies # PHP dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
php5 php5-dev php-pear phpunit && apt-get clean php5 php5-dev php-pear && apt-get clean
RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit
################## ##################
# C# dependencies (needed to build grpc_csharp_ext) # C# dependencies (needed to build grpc_csharp_ext)

@ -56,7 +56,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git php5 php5-dev phpunit unzip git php5 php5-dev unzip
RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins

@ -75,7 +75,11 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git php5 php5-dev phpunit unzip git php5 php5-dev unzip
RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins

@ -161,7 +161,10 @@ ruby -v
gem install bundler gem install bundler
# PHP dependencies # PHP dependencies
sudo apt-get install -y php php-dev phpunit php-pear unzip zlib1g-dev sudo apt-get install -y php php-dev php-pear unzip zlib1g-dev
sudo wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
sudo mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
sudo chmod +x /usr/local/bin/phpunit
curl -sS https://getcomposer.org/installer | php curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer sudo mv composer.phar /usr/local/bin/composer

Loading…
Cancel
Save