From 4454562b9be8134d630feded98a5bdb206e686ab Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Tue, 5 Dec 2017 15:32:54 -0800 Subject: [PATCH] Making the default to PHP 7.2 (#391) * Making the default to PHP 7.2 * Moved the comment due to a warning for an empty continuation line * Temporary disable the structure test on php72-custom * Re-enabled the structure test for php72-custom * Use asterisk for the PHP micro versions in composer.json * Fixed the version test for 7.2.0 * PHP 7.2.0 test fixes * Runtime Buidler test fixes * Added google/gax dep --- .../src/Builder/GenFilesCommand.php | 16 +- .../tests/GenFilesCommandTest.php | 59 ++- .../tests/test_data/php71/app.yaml | 5 + .../tests/test_data/php71/composer.json | 5 + cloudbuild.yaml | 18 + integration-tests.yaml | 6 +- php-base/Dockerfile | 2 +- php-base/build-scripts/composer.sh | 18 +- php-base/build-scripts/detect_php_version.php | 1 + testapps/build_pipeline_php56/composer.json | 2 +- testapps/build_pipeline_php56/composer.lock | 179 ++++---- .../composer.json | 8 +- testapps/integration/composer.json | 4 +- testapps/php56/composer.json | 2 +- testapps/php56_custom/composer.json | 2 +- testapps/php56_custom_configs/composer.json | 2 +- testapps/php56_extensions/composer.json | 2 +- testapps/php56_nginx_conf/composer.json | 2 +- testapps/php70_custom/composer.json | 4 +- testapps/php71_custom/composer.json | 4 +- .../{php71_e2e => php72_custom}/.gitignore | 0 testapps/php72_custom/Dockerfile.in | 18 + testapps/php72_custom/composer.json | 6 + testapps/php72_custom/php.ini | 30 ++ testapps/php72_custom/php72.yaml | 5 + testapps/php72_custom/tests/composer.json | 6 + testapps/php72_custom/tests/composer.lock | 412 ++++++++++++++++++ .../tests/phpunit.xml.dist | 0 .../tests/tests/PHP72CustomTest.php | 139 ++++++ .../php72_custom/tests/tests/bootstrap.php | 17 + testapps/php72_custom/web/Blank300.png | Bin 0 -> 178 bytes testapps/php72_custom/web/apc.php | 42 ++ testapps/php72_custom/web/app.php | 20 + testapps/php72_custom/web/extensions.php | 20 + testapps/php72_custom/web/imagick.php | 21 + testapps/php72_custom/web/parse_str.php | 23 + testapps/php72_e2e/.gitignore | 2 + .../{php71_e2e => php72_e2e}/Dockerfile.in | 0 testapps/{php71_e2e => php72_e2e}/app.yaml | 0 .../{php71_e2e => php72_e2e}/composer.json | 2 +- .../{php71_e2e => php72_e2e}/composer.lock | 179 ++++---- testapps/{php71_e2e => php72_e2e}/php.ini | 0 .../tests/composer.json | 0 testapps/php72_e2e/tests/phpunit.xml.dist | 8 + .../tests/tests/EndToEndTest.php | 0 .../tests/tests/bootstrap.php | 0 .../{php71_e2e => php72_e2e}/web/exec.php | 0 .../web/grpc_pubsub.php | 0 .../web/https-env.php | 0 .../{php71_e2e => php72_e2e}/web/index.php | 0 .../web/pdo_sqlite.php | 0 .../{php71_e2e => php72_e2e}/web/phpinfo.php | 0 .../{php71_e2e => php72_e2e}/web/session.php | 0 .../web/session_save_handler.php | 0 testapps/php_default/php_default.yaml | 2 +- 55 files changed, 1054 insertions(+), 239 deletions(-) create mode 100644 builder/gen-dockerfile/tests/test_data/php71/app.yaml create mode 100644 builder/gen-dockerfile/tests/test_data/php71/composer.json rename testapps/{php71_e2e => php72_custom}/.gitignore (100%) create mode 100644 testapps/php72_custom/Dockerfile.in create mode 100644 testapps/php72_custom/composer.json create mode 100644 testapps/php72_custom/php.ini create mode 100644 testapps/php72_custom/php72.yaml create mode 100644 testapps/php72_custom/tests/composer.json create mode 100644 testapps/php72_custom/tests/composer.lock rename testapps/{php71_e2e => php72_custom}/tests/phpunit.xml.dist (100%) create mode 100644 testapps/php72_custom/tests/tests/PHP72CustomTest.php create mode 100644 testapps/php72_custom/tests/tests/bootstrap.php create mode 100644 testapps/php72_custom/web/Blank300.png create mode 100644 testapps/php72_custom/web/apc.php create mode 100644 testapps/php72_custom/web/app.php create mode 100644 testapps/php72_custom/web/extensions.php create mode 100644 testapps/php72_custom/web/imagick.php create mode 100644 testapps/php72_custom/web/parse_str.php create mode 100644 testapps/php72_e2e/.gitignore rename testapps/{php71_e2e => php72_e2e}/Dockerfile.in (100%) rename testapps/{php71_e2e => php72_e2e}/app.yaml (100%) rename testapps/{php71_e2e => php72_e2e}/composer.json (87%) rename testapps/{php71_e2e => php72_e2e}/composer.lock (91%) rename testapps/{php71_e2e => php72_e2e}/php.ini (100%) rename testapps/{php71_e2e => php72_e2e}/tests/composer.json (100%) create mode 100644 testapps/php72_e2e/tests/phpunit.xml.dist rename testapps/{php71_e2e => php72_e2e}/tests/tests/EndToEndTest.php (100%) rename testapps/{php71_e2e => php72_e2e}/tests/tests/bootstrap.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/exec.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/grpc_pubsub.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/https-env.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/index.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/pdo_sqlite.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/phpinfo.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/session.php (100%) rename testapps/{php71_e2e => php72_e2e}/web/session_save_handler.php (100%) diff --git a/builder/gen-dockerfile/src/Builder/GenFilesCommand.php b/builder/gen-dockerfile/src/Builder/GenFilesCommand.php index 4169dc80..5a08ec74 100644 --- a/builder/gen-dockerfile/src/Builder/GenFilesCommand.php +++ b/builder/gen-dockerfile/src/Builder/GenFilesCommand.php @@ -109,17 +109,17 @@ protected function initialize(InputInterface $input, OutputInterface $output) $output->writeln(" There is no PHP runtime version specified in composer.json, or we don't support the version you specified. Google App Engine -uses the latest 7.1.x version. +uses the latest 7.2.x version. We recommend pinning your PHP version by running: -composer require php 7.1.* (replace it with your desired minor version) +composer require php 7.2.* (replace it with your desired minor version) -Using PHP version 7.1.x... +Using PHP version 7.2.x... "); } elseif ($version === DetectPhpVersion::EXACT_VERSION_SPECIFIED) { throw new ExactVersionException( "An exact PHP version was specified in composer.json. Please pin your" . - "PHP version to a minor version such as '7.1.*'." + "PHP version to a minor version such as '7.2.*'." ); } if (substr($version, 0, 3) === '5.6') { @@ -128,12 +128,12 @@ protected function initialize(InputInterface $input, OutputInterface $output) } elseif (substr($version, 0, 3) === '7.0') { $this->baseImage = $input->getOption('php70-image'); $this->detectedPhpVersion = '7.0'; - } elseif (substr($version, 0, 3) === '7.2') { - $this->baseImage = $input->getOption('php72-image'); - $this->detectedPhpVersion = '7.2'; - } else { + } elseif (substr($version, 0, 3) === '7.1') { $this->baseImage = $input->getOption('php71-image'); $this->detectedPhpVersion = '7.1'; + } else { + $this->baseImage = $input->getOption('php72-image'); + $this->detectedPhpVersion = '7.2'; } $yamlPath = getenv('GAE_APPLICATION_YAML_PATH') ?: self::DEFAULT_YAML_PATH; diff --git a/builder/gen-dockerfile/tests/GenFilesCommandTest.php b/builder/gen-dockerfile/tests/GenFilesCommandTest.php index 1a8d3b9c..67961042 100644 --- a/builder/gen-dockerfile/tests/GenFilesCommandTest.php +++ b/builder/gen-dockerfile/tests/GenFilesCommandTest.php @@ -79,6 +79,7 @@ public function testGenFilesCommand( '--php56-image' => 'gcr.io/google-appengine/php56:latest', '--php70-image' => 'gcr.io/google-appengine/php70:latest', '--php71-image' => 'gcr.io/google-appengine/php71:latest', + '--php72-image' => 'gcr.io/google-appengine/php72:latest', ]; } if ($expectedException !== null) { @@ -131,10 +132,10 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.1' \n" + "DETECTED_PHP_VERSION='7.2' \n" ] ], [ @@ -155,10 +156,10 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', ["COMPOSER_FLAGS='--prefer-dist --no-dev --no-script' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.1' \n" + "DETECTED_PHP_VERSION='7.2' \n" ] ], [ @@ -179,10 +180,10 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.1' \\\n", + "DETECTED_PHP_VERSION='7.2' \\\n", "IS_BATCH_DAEMON_RUNNING='true' \n", "enable_stackdriver_integration.sh" ] @@ -194,10 +195,10 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.1' \\\n", + "DETECTED_PHP_VERSION='7.2' \\\n", "IS_BATCH_DAEMON_RUNNING='true' \n", "enable_stackdriver_integration.sh --individual" ] @@ -220,7 +221,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\GoogleCloudVersionException' ], @@ -231,7 +232,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\GoogleCloudVersionException' ], @@ -242,7 +243,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\GoogleCloudVersionException' ], @@ -253,7 +254,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\GoogleCloudVersionException' ], @@ -283,6 +284,19 @@ public function dataProvider() "DETECTED_PHP_VERSION='7.0' \n" ] ], + [ + // PHP 7.1 + __DIR__ . '/test_data/php71', + null, + '', + '/app', + 'added by the php runtime builder', + 'gcr.io/google-appengine/php71:latest', + ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", + "FRONT_CONTROLLER_FILE='index.php' \\\n", + "DETECTED_PHP_VERSION='7.1' \n" + ] + ], [ // values on env_variables __DIR__ . '/test_data/values_only_on_env', @@ -290,7 +304,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [ "WHITELIST_FUNCTIONS='exec' \\\n", "FRONT_CONTROLLER_FILE='app.php'", @@ -310,7 +324,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\MissingDocumentRootException' ], @@ -321,7 +335,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [ "WHITELIST_FUNCTIONS='exec' \\\n", "FRONT_CONTROLLER_FILE='app.php'", @@ -342,7 +356,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', ["FRONT_CONTROLLER_FILE='app.php' \\\n"] ], [ @@ -352,7 +366,7 @@ public function dataProvider() 'my.yaml', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest' + 'gcr.io/google-appengine/php72:latest' ], [ // Overrides baseImage @@ -361,11 +375,12 @@ public function dataProvider() '--php56-image' => 'gcr.io/php-mvm-a/php56:latest', '--php70-image' => 'gcr.io/php-mvm-a/php70:latest', '--php71-image' => 'gcr.io/php-mvm-a/php71:latest', + '--php72-image' => 'gcr.io/php-mvm-a/php72:latest', ], '', '/app', 'added by the php runtime builder', - 'gcr.io/php-mvm-a/php71:latest' + 'gcr.io/php-mvm-a/php72:latest' ], [ // Has document_root set @@ -374,7 +389,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest' + 'gcr.io/google-appengine/php72:latest' ], [ // Has document_root set in env_variables @@ -383,7 +398,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest' + 'gcr.io/google-appengine/php72:latest' ], [ // document_root in both will throw exception @@ -392,7 +407,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php71:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\EnvConflictException' ], @@ -412,7 +427,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php56:latest', + 'gcr.io/google-appengine/php72:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\ExactVersionException' ] diff --git a/builder/gen-dockerfile/tests/test_data/php71/app.yaml b/builder/gen-dockerfile/tests/test_data/php71/app.yaml new file mode 100644 index 00000000..2359f78c --- /dev/null +++ b/builder/gen-dockerfile/tests/test_data/php71/app.yaml @@ -0,0 +1,5 @@ +env: flex +runtime: php + +runtime_config: + document_root: /app diff --git a/builder/gen-dockerfile/tests/test_data/php71/composer.json b/builder/gen-dockerfile/tests/test_data/php71/composer.json new file mode 100644 index 00000000..53dbe2a3 --- /dev/null +++ b/builder/gen-dockerfile/tests/test_data/php71/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "php": "7.1.*" + } +} diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 05c99f07..798271e0 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -232,6 +232,24 @@ steps: waitFor: ['php71-custom-app', 'test-runner'] id: php71-custom-test + # php72-custom test + - name: gcr.io/cloud-builders/docker + args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG', '.'] + dir: testapps/php72_custom + waitFor: ['php-onbuild'] + id: php72-custom-build + - name: gcr.io/gcp-runtimes/structure_test + args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG', '--config', 'php72.yaml', '-v'] + waitFor: ['php72-custom-build'] + - name: gcr.io/cloud-builders/docker + args: ['run', '--net=nw_$_TAG', '--name=php72-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG'] + waitFor: ['php72-custom-build', 'test-network'] + id: php72-custom-app + - name: gcr.io/cloud-builders/docker + args: ['run', '--net=nw_$_TAG','-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php72_custom/tests'] + waitFor: ['php72-custom-app', 'test-runner'] + id: php72-custom-test + # php71-extensions test - name: gcr.io/cloud-builders/docker args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-extensions:$_TAG', '.'] diff --git a/integration-tests.yaml b/integration-tests.yaml index f638f77b..d21405a4 100644 --- a/integration-tests.yaml +++ b/integration-tests.yaml @@ -6,11 +6,11 @@ steps: waitFor: ['-'] id: test-runner - # php71_e2e test + # php72_e2e test - name: gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG - args: ['/workspace/testapps/php71_e2e/tests'] + args: ['/workspace/testapps/php72_e2e/tests'] waitFor: ['test-runner'] - id: php71_e2e + id: php72_e2e env: - 'SERVICE_ACCOUNT_JSON=${_SERVICE_ACCOUNT_JSON}' - 'TAG=${_TAG}-e2e' diff --git a/php-base/Dockerfile b/php-base/Dockerfile index 4b7e35c0..1bbd794d 100644 --- a/php-base/Dockerfile +++ b/php-base/Dockerfile @@ -89,8 +89,8 @@ RUN mkdir -p $APP_DIR $UPLOAD_DIR $SESSION_SAVE_PATH \ $APP_DIR $UPLOAD_DIR $SESSION_SAVE_PATH \ $NGINX_USER_CONF_DIR $WWW_HOME $COMPOSER_HOME \ && chmod 755 $UPLOAD_DIR $SESSION_SAVE_PATH $COMPOSER_HOME \ - # For easy access to php with `su www-data -c $CMD` && ln -sf ${PHP_DIR}/bin/php /usr/bin/php +# Linking for easy access to php with `su www-data -c $CMD` # Put other config and shell files into place. COPY nginx.conf fastcgi_params gzip_params "${NGINX_DIR}/" diff --git a/php-base/build-scripts/composer.sh b/php-base/build-scripts/composer.sh index fbd1125b..b4dedbb0 100644 --- a/php-base/build-scripts/composer.sh +++ b/php-base/build-scripts/composer.sh @@ -23,7 +23,7 @@ else set -e fi -DEFAULT_PHP_VERSION="7.1" +DEFAULT_PHP_VERSION="7.2" if [ -f ${APP_DIR}/composer.json ]; then if [ -n "${DETECTED_PHP_VERSION}" ]; then @@ -36,16 +36,16 @@ if [ -f ${APP_DIR}/composer.json ]; then if [ "${PHP_VERSION}" == "exact" ]; then cat<=5.5" }, "require-dev": { - "phpunit/phpunit": "4.8.*", + "phpunit/phpunit": "^4.8.36", "squizlabs/php_codesniffer": "2.*" }, "type": "library", "autoload": { "psr-4": { - "Google\\GAX\\": "src/", - "Google\\GAX\\UnitTests\\": "tests/", - "Google\\": "src/generated/Google/", - "GPBMetadata\\": "src/generated/GPBMetadata/" + "Google\\": "src", + "GPBMetadata\\Google\\": "metadata" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Google API Extensions for PHP", + "description": "Google API Core for PHP", "homepage": "https://github.com/googleapis/gax-php", "keywords": [ "google" ], - "time": "2017-08-31 21:40:57" + "time": "2017-11-21T23:04:00+00:00" }, { "name": "google/proto-client", - "version": "0.23.0", + "version": "0.27.0", "source": { "type": "git", "url": "https://github.com/googleapis/proto-client-php.git", - "reference": "b159f408b6acdba55bf727c3639d03bb0117fc27" + "reference": "39a6917748da381945e23876e8a9bf6a8e917937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/b159f408b6acdba55bf727c3639d03bb0117fc27", - "reference": "b159f408b6acdba55bf727c3639d03bb0117fc27", + "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/39a6917748da381945e23876e8a9bf6a8e917937", + "reference": "39a6917748da381945e23876e8a9bf6a8e917937", "shasum": "" }, "require": { - "google/protobuf": "^3.3.2", + "google/protobuf": "^3.4", "php": ">=5.5" }, "require-dev": { - "google/gax": ">=0.20.0", - "phpunit/phpunit": "4.8.*" + "google/gax": ">=0.25.0", + "phpunit/phpunit": "^4.8.36" }, "type": "library", "autoload": { @@ -304,7 +301,7 @@ "keywords": [ "google" ], - "time": "2017-09-01 22:33:04" + "time": "2017-11-22T22:05:44+00:00" }, { "name": "google/protobuf", @@ -345,7 +342,7 @@ "keywords": [ "proto" ], - "time": "2017-09-14 19:24:28" + "time": "2017-09-14T19:24:28+00:00" }, { "name": "grpc/grpc", @@ -386,7 +383,7 @@ "keywords": [ "rpc" ], - "time": "2017-09-11 20:50:39" + "time": "2017-09-11T20:50:39+00:00" }, { "name": "guzzlehttp/guzzle", @@ -451,7 +448,7 @@ "rest", "web service" ], - "time": "2017-06-22 18:50:49" + "time": "2017-06-22T18:50:49+00:00" }, { "name": "guzzlehttp/promises", @@ -502,7 +499,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -567,7 +564,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "monolog/monolog", @@ -645,20 +642,20 @@ "logging", "psr-3" ], - "time": "2017-06-19 01:22:40" + "time": "2017-06-19T01:22:40+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.10", + "version": "v2.0.11", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", "shasum": "" }, "require": { @@ -693,7 +690,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13 16:27:32" + "time": "2017-09-27T21:40:39+00:00" }, { "name": "pimple/pimple", @@ -739,7 +736,7 @@ "container", "dependency injection" ], - "time": "2013-11-22 08:30:29" + "time": "2013-11-22T08:30:29+00:00" }, { "name": "psr/cache", @@ -785,7 +782,7 @@ "psr", "psr-6" ], - "time": "2016-08-06 20:24:11" + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/http-message", @@ -835,7 +832,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -882,7 +879,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "ramsey/uuid", @@ -964,7 +961,7 @@ "identifier", "uuid" ], - "time": "2017-09-22 20:46:04" + "time": "2017-09-22T20:46:04+00:00" }, { "name": "rize/uri-template", @@ -1008,7 +1005,7 @@ "template", "uri" ], - "time": "2017-06-14 03:57:53" + "time": "2017-06-14T03:57:53+00:00" }, { "name": "silex/silex", @@ -1085,20 +1082,20 @@ "keywords": [ "microframework" ], - "time": "2017-04-30 16:26:54" + "time": "2017-04-30T16:26:54+00:00" }, { "name": "symfony/debug", - "version": "v3.3.9", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "8beb24eec70b345c313640962df933499373a944" + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/8beb24eec70b345c313640962df933499373a944", - "reference": "8beb24eec70b345c313640962df933499373a944", + "url": "https://api.github.com/repos/symfony/debug/zipball/fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", "shasum": "" }, "require": { @@ -1109,12 +1106,12 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1141,7 +1138,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-09-01 13:23:39" + "time": "2017-11-21T09:01:46+00:00" }, { "name": "symfony/event-dispatcher", @@ -1201,7 +1198,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-19 10:44:15" + "time": "2016-07-19T10:44:15+00:00" }, { "name": "symfony/http-foundation", @@ -1254,7 +1251,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-07-17 13:54:30" + "time": "2016-07-17T13:54:30+00:00" }, { "name": "symfony/http-kernel", @@ -1336,20 +1333,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-07-30 09:10:37" + "time": "2016-07-30T09:10:37+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { @@ -1361,7 +1358,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1395,7 +1392,7 @@ "portable", "shim" ], - "time": "2017-06-14 15:44:48" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/routing", @@ -1470,7 +1467,7 @@ "uri", "url" ], - "time": "2016-06-29 05:40:00" + "time": "2016-06-29T05:40:00+00:00" } ], "packages-dev": [], @@ -1480,7 +1477,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.6" + "php": "5.6.*" }, "platform-dev": [] } diff --git a/testapps/integration-individual-packages/composer.json b/testapps/integration-individual-packages/composer.json index 2d0c3e87..5c30ed06 100644 --- a/testapps/integration-individual-packages/composer.json +++ b/testapps/integration-individual-packages/composer.json @@ -5,11 +5,13 @@ } }, "require": { - "php": "5.6.*|7.0.*|7.1.*", + "php": "7.2.*", "ext-grpc": "*", + "ext-protobuf": "*", "silex/silex": "^1.3", - "google/cloud-logging": "^1.5", - "google/cloud-error-reporting": "^0.5" + "google/cloud-logging": "^1.7.0", + "google/cloud-error-reporting": "^0.7.0", + "google/gax": "^0.27" }, "require-dev": { "behat/mink": "^1.7", diff --git a/testapps/integration/composer.json b/testapps/integration/composer.json index 50c79b45..4af66d75 100644 --- a/testapps/integration/composer.json +++ b/testapps/integration/composer.json @@ -5,9 +5,9 @@ } }, "require": { - "php": "5.6.*|7.0.*|7.1.*", + "php": "7.2.*", "silex/silex": "^1.3", - "google/cloud": "^0.40" + "google/cloud": "^0.45" }, "require-dev": { "behat/mink": "^1.7", diff --git a/testapps/php56/composer.json b/testapps/php56/composer.json index cb21e062..8db564e0 100644 --- a/testapps/php56/composer.json +++ b/testapps/php56/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^5.6" + "php": "5.6.*" }, "require-dev": { "guzzlehttp/guzzle": "~6.0", diff --git a/testapps/php56_custom/composer.json b/testapps/php56_custom/composer.json index b4642c98..3b334e7d 100644 --- a/testapps/php56_custom/composer.json +++ b/testapps/php56_custom/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^5.6", + "php": "5.6.*", "ext-bcmath": "*", "silex/silex": "^1.3" }, diff --git a/testapps/php56_custom_configs/composer.json b/testapps/php56_custom_configs/composer.json index cb21e062..8db564e0 100644 --- a/testapps/php56_custom_configs/composer.json +++ b/testapps/php56_custom_configs/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^5.6" + "php": "5.6.*" }, "require-dev": { "guzzlehttp/guzzle": "~6.0", diff --git a/testapps/php56_extensions/composer.json b/testapps/php56_extensions/composer.json index fced2064..14e29349 100644 --- a/testapps/php56_extensions/composer.json +++ b/testapps/php56_extensions/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^5.6", + "php": "5.6.*", "phpunit/phpunit": "^4.8.35", "ext-amqp": "*", "ext-bcmath": "*", diff --git a/testapps/php56_nginx_conf/composer.json b/testapps/php56_nginx_conf/composer.json index cb21e062..8db564e0 100644 --- a/testapps/php56_nginx_conf/composer.json +++ b/testapps/php56_nginx_conf/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^5.6" + "php": "5.6.*" }, "require-dev": { "guzzlehttp/guzzle": "~6.0", diff --git a/testapps/php70_custom/composer.json b/testapps/php70_custom/composer.json index d0e2f971..297eb27b 100644 --- a/testapps/php70_custom/composer.json +++ b/testapps/php70_custom/composer.json @@ -1,6 +1,6 @@ { "require": { - "silex/silex": "^1.3", - "php": "~7.0.15" + "php": "7.0.*", + "silex/silex": "^1.3" } } diff --git a/testapps/php71_custom/composer.json b/testapps/php71_custom/composer.json index 13203e22..acfe58c0 100644 --- a/testapps/php71_custom/composer.json +++ b/testapps/php71_custom/composer.json @@ -1,6 +1,6 @@ { "require": { - "silex/silex": "^1.3", - "php": "^7.1" + "php": "7.1.*", + "silex/silex": "^1.3" } } diff --git a/testapps/php71_e2e/.gitignore b/testapps/php72_custom/.gitignore similarity index 100% rename from testapps/php71_e2e/.gitignore rename to testapps/php72_custom/.gitignore diff --git a/testapps/php72_custom/Dockerfile.in b/testapps/php72_custom/Dockerfile.in new file mode 100644 index 00000000..2b1ce1c8 --- /dev/null +++ b/testapps/php72_custom/Dockerfile.in @@ -0,0 +1,18 @@ +# Copyright 2015 Google Inc. +# +# 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 ${BASE_IMAGE} + +ENV DOCUMENT_ROOT=/app/web +ENV FRONT_CONTROLLER_FILE=app.php diff --git a/testapps/php72_custom/composer.json b/testapps/php72_custom/composer.json new file mode 100644 index 00000000..9c3f2ce2 --- /dev/null +++ b/testapps/php72_custom/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "php": "7.2.*", + "silex/silex": "^1.3" + } +} diff --git a/testapps/php72_custom/php.ini b/testapps/php72_custom/php.ini new file mode 100644 index 00000000..88180435 --- /dev/null +++ b/testapps/php72_custom/php.ini @@ -0,0 +1,30 @@ +; Copyright 2015 Google Inc. +; +; 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. + +extension=bcmath.so +extension=calendar.so +extension=exif.so +extension=ftp.so +extension=gd.so +extension=gettext.so +extension=intl.so +extension=shmop.so +extension=soap.so +extension=sqlite3.so +extension=pdo_sqlite.so +extension=xmlrpc.so +extension=xsl.so +extension=mongodb.so +extension=redis.so +extension=imagick.so diff --git a/testapps/php72_custom/php72.yaml b/testapps/php72_custom/php72.yaml new file mode 100644 index 00000000..b9b5b281 --- /dev/null +++ b/testapps/php72_custom/php72.yaml @@ -0,0 +1,5 @@ +schemaVersion: "1.0.0" +commandTests: + - name: "version" + command: ["/opt/php/bin/php", "-v"] + expectedOutput: ["PHP 7\\.2.*"] diff --git a/testapps/php72_custom/tests/composer.json b/testapps/php72_custom/tests/composer.json new file mode 100644 index 00000000..c3a35663 --- /dev/null +++ b/testapps/php72_custom/tests/composer.json @@ -0,0 +1,6 @@ +{ + "require-dev": { + "guzzlehttp/guzzle": "~6.0", + "symfony/browser-kit": "~2" + } +} diff --git a/testapps/php72_custom/tests/composer.lock b/testapps/php72_custom/tests/composer.lock new file mode 100644 index 00000000..de43efaf --- /dev/null +++ b/testapps/php72_custom/tests/composer.lock @@ -0,0 +1,412 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "02a505b2f88487808221f146e702bb5a", + "content-hash": "9a76a4394509fe13de5fc57c9fb84b67", + "packages": [], + "packages-dev": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.2.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.3.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2016-10-08 15:01:37" + }, + { + "name": "guzzlehttp/promises", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "2693c101803ca78b27972d84081d027fca790a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/2693c101803ca78b27972d84081d027fca790a1e", + "reference": "2693c101803ca78b27972d84081d027fca790a1e", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-11-18 17:47:58" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-06-24 23:00:38" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06 14:39:51" + }, + { + "name": "symfony/browser-kit", + "version": "v2.8.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "165bf6d1e72cd72f2fe170a070aa2a1f17f2d744" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/165bf6d1e72cd72f2fe170a070aa2a1f17f2d744", + "reference": "165bf6d1e72cd72f2fe170a070aa2a1f17f2d744", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/dom-crawler": "~2.1|~3.0.0" + }, + "require-dev": { + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/process": "~2.3.34|~2.7,>=2.7.6|~3.0.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "https://symfony.com", + "time": "2016-09-06 10:55:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "dff8fecf1f56990d88058e3a1885c2a5f1b8e970" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/dff8fecf1f56990d88058e3a1885c2a5f1b8e970", + "reference": "dff8fecf1f56990d88058e3a1885c2a5f1b8e970", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14 01:06:16" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/testapps/php71_e2e/tests/phpunit.xml.dist b/testapps/php72_custom/tests/phpunit.xml.dist similarity index 100% rename from testapps/php71_e2e/tests/phpunit.xml.dist rename to testapps/php72_custom/tests/phpunit.xml.dist diff --git a/testapps/php72_custom/tests/tests/PHP72CustomTest.php b/testapps/php72_custom/tests/tests/PHP72CustomTest.php new file mode 100644 index 00000000..fc6d7c4b --- /dev/null +++ b/testapps/php72_custom/tests/tests/PHP72CustomTest.php @@ -0,0 +1,139 @@ +client = new Client(['base_uri' => 'http://php72-custom:8080/']); + } + + public function testExtensions() + { + $resp = $this->client->get('extensions.php'); + $loaded = $resp->getBody()->getContents(); + foreach (self::$extensions as $ext) { + $this->assertContains($ext, $loaded); + } + } + + public function testApcIsAbleToExecuteCommonOperations() + { + $resp = $this->client->get('apc.php'); + $body = $resp->getBody()->getContents(); + + $this->assertContains('success storing in apc bc', $body); + $this->assertContains('success fetching from apc bc', $body); + $this->assertContains('success deleting from apc bc', $body); + $this->assertContains('success storing in apcu', $body); + $this->assertContains('success fetching from apcu', $body); + $this->assertContains('success deleting from apcu', $body); + } + + public function testImagickCanLoad() + { + $resp = $this->client->get('imagick.php'); + $body = $resp->getBody()->getContents(); + + // test image should by 300px by 1px + $this->assertContains('300x1', $body); + } + + public function testFrontControllerFileEnv() + { + // Access the top page and it should be served by app.php + $resp = $this->client->get(''); + $body = $resp->getBody()->getContents(); + $this->assertContains('FRONT_CONTROLLER_FILE works', $body); + } +} diff --git a/testapps/php72_custom/tests/tests/bootstrap.php b/testapps/php72_custom/tests/tests/bootstrap.php new file mode 100644 index 00000000..864f1cd1 --- /dev/null +++ b/testapps/php72_custom/tests/tests/bootstrap.php @@ -0,0 +1,17 @@ +|H(?D8gCb z5n0T@z%2~Ij105pNB{-dOFVsD*{^c5h_NtFjy?r4K(@p+qQp5rH#aq}gu%HeHL)Z$ zMWH;iBts!2BUQoO(>LIKifSHEp_r$OV@SoV $value) { + echo $value . "\n"; +} diff --git a/testapps/php72_custom/web/imagick.php b/testapps/php72_custom/web/imagick.php new file mode 100644 index 00000000..59ed28fb --- /dev/null +++ b/testapps/php72_custom/web/imagick.php @@ -0,0 +1,21 @@ +getImageGeometry(); +echo $dimensions['width'] . 'x' . $dimensions['height']; diff --git a/testapps/php72_custom/web/parse_str.php b/testapps/php72_custom/web/parse_str.php new file mode 100644 index 00000000..978b35d1 --- /dev/null +++ b/testapps/php72_custom/web/parse_str.php @@ -0,0 +1,23 @@ +=5.5" }, "require-dev": { - "phpunit/phpunit": "4.8.*", + "phpunit/phpunit": "^4.8.36", "squizlabs/php_codesniffer": "2.*" }, "type": "library", "autoload": { "psr-4": { - "Google\\GAX\\": "src/", - "Google\\GAX\\UnitTests\\": "tests/", - "Google\\": "src/generated/Google/", - "GPBMetadata\\": "src/generated/GPBMetadata/" + "Google\\": "src", + "GPBMetadata\\Google\\": "metadata" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Google API Extensions for PHP", + "description": "Google API Core for PHP", "homepage": "https://github.com/googleapis/gax-php", "keywords": [ "google" ], - "time": "2017-08-31 21:40:57" + "time": "2017-11-21T23:04:00+00:00" }, { "name": "google/proto-client", - "version": "0.23.0", + "version": "0.27.0", "source": { "type": "git", "url": "https://github.com/googleapis/proto-client-php.git", - "reference": "b159f408b6acdba55bf727c3639d03bb0117fc27" + "reference": "39a6917748da381945e23876e8a9bf6a8e917937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/b159f408b6acdba55bf727c3639d03bb0117fc27", - "reference": "b159f408b6acdba55bf727c3639d03bb0117fc27", + "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/39a6917748da381945e23876e8a9bf6a8e917937", + "reference": "39a6917748da381945e23876e8a9bf6a8e917937", "shasum": "" }, "require": { - "google/protobuf": "^3.3.2", + "google/protobuf": "^3.4", "php": ">=5.5" }, "require-dev": { - "google/gax": ">=0.20.0", - "phpunit/phpunit": "4.8.*" + "google/gax": ">=0.25.0", + "phpunit/phpunit": "^4.8.36" }, "type": "library", "autoload": { @@ -304,7 +301,7 @@ "keywords": [ "google" ], - "time": "2017-09-01 22:33:04" + "time": "2017-11-22T22:05:44+00:00" }, { "name": "google/protobuf", @@ -345,7 +342,7 @@ "keywords": [ "proto" ], - "time": "2017-09-14 19:24:28" + "time": "2017-09-14T19:24:28+00:00" }, { "name": "grpc/grpc", @@ -386,7 +383,7 @@ "keywords": [ "rpc" ], - "time": "2017-09-11 20:50:39" + "time": "2017-09-11T20:50:39+00:00" }, { "name": "guzzlehttp/guzzle", @@ -451,7 +448,7 @@ "rest", "web service" ], - "time": "2017-06-22 18:50:49" + "time": "2017-06-22T18:50:49+00:00" }, { "name": "guzzlehttp/promises", @@ -502,7 +499,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -567,7 +564,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "monolog/monolog", @@ -645,20 +642,20 @@ "logging", "psr-3" ], - "time": "2017-06-19 01:22:40" + "time": "2017-06-19T01:22:40+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.10", + "version": "v2.0.11", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", "shasum": "" }, "require": { @@ -693,7 +690,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13 16:27:32" + "time": "2017-09-27T21:40:39+00:00" }, { "name": "pimple/pimple", @@ -739,7 +736,7 @@ "container", "dependency injection" ], - "time": "2013-11-22 08:30:29" + "time": "2013-11-22T08:30:29+00:00" }, { "name": "psr/cache", @@ -785,7 +782,7 @@ "psr", "psr-6" ], - "time": "2016-08-06 20:24:11" + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/http-message", @@ -835,7 +832,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -882,7 +879,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "ramsey/uuid", @@ -964,7 +961,7 @@ "identifier", "uuid" ], - "time": "2017-09-22 20:46:04" + "time": "2017-09-22T20:46:04+00:00" }, { "name": "rize/uri-template", @@ -1008,7 +1005,7 @@ "template", "uri" ], - "time": "2017-06-14 03:57:53" + "time": "2017-06-14T03:57:53+00:00" }, { "name": "silex/silex", @@ -1085,20 +1082,20 @@ "keywords": [ "microframework" ], - "time": "2017-04-30 16:26:54" + "time": "2017-04-30T16:26:54+00:00" }, { "name": "symfony/debug", - "version": "v3.3.9", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "8beb24eec70b345c313640962df933499373a944" + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/8beb24eec70b345c313640962df933499373a944", - "reference": "8beb24eec70b345c313640962df933499373a944", + "url": "https://api.github.com/repos/symfony/debug/zipball/fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", "shasum": "" }, "require": { @@ -1109,12 +1106,12 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1141,7 +1138,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-09-01 13:23:39" + "time": "2017-11-21T09:01:46+00:00" }, { "name": "symfony/event-dispatcher", @@ -1201,7 +1198,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-19 10:44:15" + "time": "2016-07-19T10:44:15+00:00" }, { "name": "symfony/http-foundation", @@ -1254,7 +1251,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-07-17 13:54:30" + "time": "2016-07-17T13:54:30+00:00" }, { "name": "symfony/http-kernel", @@ -1336,20 +1333,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-07-30 09:10:37" + "time": "2016-07-30T09:10:37+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { @@ -1361,7 +1358,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1395,7 +1392,7 @@ "portable", "shim" ], - "time": "2017-06-14 15:44:48" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/routing", @@ -1470,7 +1467,7 @@ "uri", "url" ], - "time": "2016-06-29 05:40:00" + "time": "2016-06-29T05:40:00+00:00" } ], "packages-dev": [], @@ -1480,7 +1477,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": "7.2.*" }, "platform-dev": [] } diff --git a/testapps/php71_e2e/php.ini b/testapps/php72_e2e/php.ini similarity index 100% rename from testapps/php71_e2e/php.ini rename to testapps/php72_e2e/php.ini diff --git a/testapps/php71_e2e/tests/composer.json b/testapps/php72_e2e/tests/composer.json similarity index 100% rename from testapps/php71_e2e/tests/composer.json rename to testapps/php72_e2e/tests/composer.json diff --git a/testapps/php72_e2e/tests/phpunit.xml.dist b/testapps/php72_e2e/tests/phpunit.xml.dist new file mode 100644 index 00000000..8ded8984 --- /dev/null +++ b/testapps/php72_e2e/tests/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + tests + + + diff --git a/testapps/php71_e2e/tests/tests/EndToEndTest.php b/testapps/php72_e2e/tests/tests/EndToEndTest.php similarity index 100% rename from testapps/php71_e2e/tests/tests/EndToEndTest.php rename to testapps/php72_e2e/tests/tests/EndToEndTest.php diff --git a/testapps/php71_e2e/tests/tests/bootstrap.php b/testapps/php72_e2e/tests/tests/bootstrap.php similarity index 100% rename from testapps/php71_e2e/tests/tests/bootstrap.php rename to testapps/php72_e2e/tests/tests/bootstrap.php diff --git a/testapps/php71_e2e/web/exec.php b/testapps/php72_e2e/web/exec.php similarity index 100% rename from testapps/php71_e2e/web/exec.php rename to testapps/php72_e2e/web/exec.php diff --git a/testapps/php71_e2e/web/grpc_pubsub.php b/testapps/php72_e2e/web/grpc_pubsub.php similarity index 100% rename from testapps/php71_e2e/web/grpc_pubsub.php rename to testapps/php72_e2e/web/grpc_pubsub.php diff --git a/testapps/php71_e2e/web/https-env.php b/testapps/php72_e2e/web/https-env.php similarity index 100% rename from testapps/php71_e2e/web/https-env.php rename to testapps/php72_e2e/web/https-env.php diff --git a/testapps/php71_e2e/web/index.php b/testapps/php72_e2e/web/index.php similarity index 100% rename from testapps/php71_e2e/web/index.php rename to testapps/php72_e2e/web/index.php diff --git a/testapps/php71_e2e/web/pdo_sqlite.php b/testapps/php72_e2e/web/pdo_sqlite.php similarity index 100% rename from testapps/php71_e2e/web/pdo_sqlite.php rename to testapps/php72_e2e/web/pdo_sqlite.php diff --git a/testapps/php71_e2e/web/phpinfo.php b/testapps/php72_e2e/web/phpinfo.php similarity index 100% rename from testapps/php71_e2e/web/phpinfo.php rename to testapps/php72_e2e/web/phpinfo.php diff --git a/testapps/php71_e2e/web/session.php b/testapps/php72_e2e/web/session.php similarity index 100% rename from testapps/php71_e2e/web/session.php rename to testapps/php72_e2e/web/session.php diff --git a/testapps/php71_e2e/web/session_save_handler.php b/testapps/php72_e2e/web/session_save_handler.php similarity index 100% rename from testapps/php71_e2e/web/session_save_handler.php rename to testapps/php72_e2e/web/session_save_handler.php diff --git a/testapps/php_default/php_default.yaml b/testapps/php_default/php_default.yaml index efb8e3da..66404f33 100644 --- a/testapps/php_default/php_default.yaml +++ b/testapps/php_default/php_default.yaml @@ -3,7 +3,7 @@ schemaVersion: "1.0.0" commandTests: - name: "version" command: ["/opt/php/bin/php", "-v"] - expectedOutput: ["PHP 7\\.1.*"] + expectedOutput: ["PHP 7\\.2.*"] - name: "path" command: ["printenv", "PATH"]