From eae4eb7ecf1459c6097ba8723004304c7b1fa937 Mon Sep 17 00:00:00 2001 From: frost-byte Date: Sun, 9 May 2021 23:16:56 -0500 Subject: [PATCH] Add support for php7.4 and 8.0 Fix for GoogleCloudPlatform#529 Enable Verbose Debugging for gcloud build Authorize service account in install_test_dependencies.sh Remove Unsupported Versions < 7.3 Update PHP versions to latest releases Update PHPUnit to v9.5.4 for all tests Build and include librabbitmq as library for amqp extension Use Datastax's libuv1 library package Use updated pecl extension versions Disable apcu_bc extension for newer versions Update Couchbase to v3 Switch to container-structure-test Use the ev extension when testing for shared, disabled extension Make the container for the Test Runner base image configurable using env Update `check_versions.sh` to include substition for container registry Use apcu extension in php80 instead of apcu_bc Use bionic package for libvips Disable build of sodium extension, it is included natively Use latest release from github for pq extension Use latest release from github for raphf extension Create xmlrpc extension Update tests to use v5 of `symfony/browser-kit` Disable stackdriver_debugger for php8 --- .gitignore | 2 + NOTES.md | 153 + builder/gen-dockerfile/Dockerfile.in | 2 +- builder/gen-dockerfile/phpunit.xml.dist | 2 +- .../src/Builder/GenFilesCommand.php | 53 +- .../gen-dockerfile/src/DetectPhpVersion.php | 3 +- .../tests/GenFilesCommandTest.php | 84 +- .../tests/test_data/php80/app.yaml | 5 + .../tests/test_data/php80/composer.json | 5 + builder/php-latest.yaml | 2 +- check-versions/cloudbuild.yaml | 2 +- check-versions/composer.lock | 564 +++ check-versions/phpunit.xml.dist | 2 +- check-versions/tests/VersionTest.php | 62 +- circle.yml | 2 +- cloudbuild-test-runner/Dockerfile.in | 2 +- cloudbuild-ubuntu.yaml | 182 +- composer.json | 6 +- composer.lock | 4070 +++++++++++++++++ integration-tests.yaml | 11 + package-builder/Dockerfile | 47 +- package-builder/README.md | 20 +- package-builder/build.sh | 31 +- package-builder/build_packages.sh | 2 +- package-builder/debian/control.in | 4 +- .../patches/php80-parse_str_harden.patch | 0 package-builder/debian/rules.in | 25 +- package-builder/extensions/amqp/build.sh | 8 +- .../extensions/amqp/debian/control.in | 4 +- .../extensions/amqp/debian/rules.in | 3 +- package-builder/extensions/apcu/build.sh | 2 +- package-builder/extensions/apcu_bc/build.sh | 4 +- package-builder/extensions/apm/build.sh | 2 +- package-builder/extensions/cassandra/build.sh | 19 +- package-builder/extensions/couchbase/build.sh | 10 +- .../extensions/couchbase/debian/control.in | 2 +- .../extensions/couchbase/debian/copyright | 2 +- package-builder/extensions/eio/build.sh | 3 +- .../extensions/event/debian/control.in | 2 +- package-builder/extensions/hprose/build.sh | 10 +- package-builder/extensions/imagick/build.sh | 6 +- package-builder/extensions/jsond/build.sh | 10 +- package-builder/extensions/libsodium/build.sh | 6 +- .../extensions/libsodium/debian/control.in | 2 +- package-builder/extensions/lua/build.sh | 3 + package-builder/extensions/mongodb/build.sh | 2 +- .../extensions/opencensus/build.sh | 20 +- .../extensions/opencensus/debian/rules | 14 + package-builder/extensions/phalcon/build.sh | 4 + package-builder/extensions/pq/build.sh | 2 +- package-builder/extensions/raphf/build.sh | 2 +- package-builder/extensions/redis/build.sh | 2 +- package-builder/extensions/skeleton/build.sh | 0 .../extensions/stackdriver_debugger/build.sh | 7 +- package-builder/extensions/stomp/build.sh | 2 + package-builder/extensions/tcpwrap/build.sh | 5 + .../extensions/timezonedb/build.sh | 2 +- package-builder/extensions/v8js/build.sh | 6 +- .../extensions/v8js/debian/rules.in | 2 +- package-builder/extensions/vips/build.sh | 5 +- .../extensions/vips/debian/control.in | 2 +- package-builder/extensions/xmlrpc/build.sh | 17 + .../extensions/xmlrpc/debian/compat | 1 + .../extensions/xmlrpc/debian/control.in | 12 + .../extensions/xmlrpc/debian/copyright | 72 + .../extensions/xmlrpc/debian/ext-xmlrpc.ini | 1 + .../xmlrpc/debian/gcp-php-xmlrpc.install.in | 1 + .../extensions/xmlrpc/debian/rules.in | 14 + package-builder/functions.sh | 44 +- package-builder/gpgkeys/php80/gcaruso.key | 52 + package-builder/gpgkeys/php80/sgolemon.key | 51 + .../libraries/cassandra-cpp-driver/build.sh | 6 +- .../libraries/librabbitmq/build.sh | 37 + .../libraries/librabbitmq/debian/compat | 1 + .../libraries/librabbitmq/debian/control | 19 + .../libraries/librabbitmq/debian/copyright | 36 + .../debian/librabbitmq-dev.install | 5 + .../librabbitmq/debian/librabbitmq.install | 3 + .../librabbitmq/debian/librabbitmq.links | 5 + .../libraries/librabbitmq/debian/rules | 19 + package-builder/libraries/libv8/build.sh | 10 +- package-builder/libraries/libv8/debian/rules | 2 +- .../deployment-latency/phpunit.xml.dist | 2 +- .../tests/CollectDeploymentLatencyTest.php | 7 +- php-base/Dockerfile | 77 +- php-base/README.md | 4 +- php-base/build-scripts/composer.json | 8 + php-base/build-scripts/composer.sh | 26 +- php-base/build-scripts/dump_php_versions.sh | 2 +- php-base/build-scripts/install_php.sh | 11 +- php-base/build-scripts/install_php80.sh | 56 + .../build-scripts/src/DetectPhpVersion.php | 3 +- .../build-scripts/src/InstallExtensions.php | 33 +- php-base/composer.json | 2 +- php-base/nginx.conf | 6 +- php-base/php-base.yaml | 15 +- php-base/phpunit.xml.dist | 2 +- php-base/tests/DetectPhpVersionTest.php | 35 +- php-base/tests/InstallExtensionsTest.php | 19 +- php-base/tests/StackdriverIntegrationTest.php | 14 +- php-base/tests/samples/bad_combo.json | 2 +- php-base/tests/samples/exact.json | 2 +- php-base/tests/samples/mixed.json | 4 +- php-base/tests/samples/oauth.json | 6 + php-base/tests/samples/shared.json | 4 +- php-onbuild/Dockerfile.in | 4 +- php-onbuild/php.yaml | 13 +- php-versioned/Dockerfile.in | 18 +- php-versioned/php73.yaml | 12 +- php-versioned/php74.yaml | 12 +- php-versioned/php80.yaml | 11 + phpunit.xml.dist | 2 +- scripts/build_images.sh | 18 +- scripts/check_versions.sh | 12 +- scripts/install_test_dependencies.sh | 2 + scripts/record_deployment_latency.sh | 2 +- scripts/release.sh | 12 +- scripts/run_acceptance_tests.sh | 8 +- scripts/ubuntu-packages.cfg | 2 +- scripts/update-gcs.sh | 18 +- testapps/build_pipeline/composer.json | 2 +- testapps/build_pipeline/tests/composer.json | 4 +- .../build_pipeline/tests/phpunit.xml.dist | 2 +- .../tests/tests/EndToEndTest.php | 22 +- testapps/build_pipeline_std/composer.json | 2 +- .../build_pipeline_std/tests/composer.json | 4 +- .../build_pipeline_std/tests/phpunit.xml.dist | 2 +- .../tests/tests/EndToEndTest.php | 25 +- testapps/builder_test/phpunit.xml.dist | 2 +- .../builder_test/tests/DockerfileTest.php | 4 +- .../cloudbuild.yaml.in | 2 +- .../composer.json | 8 +- .../test.yaml.in | 2 +- testapps/integration/cloudbuild.yaml.in | 2 +- testapps/integration/composer.json | 8 +- testapps/integration/test.yaml.in | 2 +- testapps/php73_custom/composer.json | 1 - testapps/php73_custom/php73.yaml | 5 +- testapps/php73_custom/tests/phpunit.xml.dist | 2 +- .../tests/tests/PHP73CustomTest.php | 24 +- testapps/php73_e2e/tests/composer.json | 4 +- testapps/php73_e2e/tests/phpunit.xml.dist | 2 +- .../php73_e2e/tests/tests/EndToEndTest.php | 18 +- testapps/php73_extensions/composer.json | 2 +- testapps/php73_extensions/phpunit.xml.dist | 2 +- testapps/php73_extensions/tests/GdTest.php | 8 +- testapps/php73_extensions/tests/GmpTest.php | 8 +- .../php73_extensions/tests/ImagickTest.php | 8 +- testapps/php73_extensions/tests/OauthTest.php | 9 + .../php73_extensions/tests/PhalconTest.php | 12 +- .../php73_extensions/tests/ProtobufTest.php | 9 + .../php73_extensions/tests/RdkafkaTest.php | 9 + .../php73_extensions_legacy/composer.json | 4 +- testapps/php73_extensions_legacy/php.ini | 1 + .../php73_extensions_legacy/phpunit.xml.dist | 2 +- .../php73_extensions_legacy/tests/EvTest.php | 8 +- .../tests/EventTest.php | 9 + .../php73_extensions_legacy/tests/GdTest.php | 8 +- .../php73_extensions_legacy/tests/GmpTest.php | 8 +- .../tests/ImagickTest.php | 8 +- .../tests/LibSodiumTest.php | 8 +- .../tests/OauthTest.php | 9 + .../tests/PhalconTest.php | 12 +- .../tests/ProtobufTest.php | 9 + testapps/php74_custom/php74.yaml | 5 +- testapps/php74_custom/tests/phpunit.xml.dist | 2 +- .../tests/tests/PHP74CustomTest.php | 23 +- testapps/php74_e2e/tests/composer.json | 4 +- testapps/php74_e2e/tests/phpunit.xml.dist | 2 +- .../php74_e2e/tests/tests/EndToEndTest.php | 18 +- testapps/php74_extensions/composer.json | 3 +- testapps/php74_extensions/phpunit.xml.dist | 2 +- .../tests/ExtensionsLoadedTest.php | 2 +- .../php74_extensions_legacy/composer.json | 2 +- testapps/php74_extensions_legacy/php.ini | 1 + .../php74_extensions_legacy/phpunit.xml.dist | 2 +- .../tests/ExtensionsLoadedTest.php | 2 +- testapps/php80_custom/.gitignore | 2 + testapps/php80_custom/Dockerfile.in | 18 + testapps/php80_custom/composer.json | 23 + testapps/php80_custom/php80.yaml | 9 + testapps/php80_custom/tests/composer.json | 6 + testapps/php80_custom/tests/composer.lock | 951 ++++ testapps/php80_custom/tests/phpunit.xml.dist | 8 + .../tests/tests/PHP80CustomTest.php | 134 + .../php80_custom/tests/tests/bootstrap.php | 17 + testapps/php80_custom/web/Blank300.png | Bin 0 -> 178 bytes testapps/php80_custom/web/apc.php | 30 + testapps/php80_custom/web/app.php | 20 + testapps/php80_custom/web/extensions.php | 20 + testapps/php80_custom/web/imagick.php | 21 + testapps/php80_custom/web/parse_str.php | 23 + testapps/php80_e2e/.gitignore | 2 + testapps/php80_e2e/Dockerfile.in | 17 + testapps/php80_e2e/app.yaml | 15 + testapps/php80_e2e/composer.json | 13 + testapps/php80_e2e/tests/composer.json | 7 + testapps/php80_e2e/tests/phpunit.xml.dist | 8 + .../php80_e2e/tests/tests/EndToEndTest.php | 250 + testapps/php80_e2e/tests/tests/bootstrap.php | 18 + testapps/php80_e2e/web/exec.php | 24 + testapps/php80_e2e/web/grpc_pubsub.php | 11 + testapps/php80_e2e/web/https-env.php | 19 + testapps/php80_e2e/web/index.php | 30 + testapps/php80_e2e/web/pdo_sqlite.php | 19 + testapps/php80_e2e/web/phpinfo.php | 18 + testapps/php80_e2e/web/session.php | 25 + .../php80_e2e/web/session_save_handler.php | 19 + testapps/php80_extensions/.gitignore | 1 + testapps/php80_extensions/Dockerfile.in | 15 + testapps/php80_extensions/composer.json | 49 + testapps/php80_extensions/phpunit.xml.dist | 8 + testapps/php80_extensions/tests/Blank300.png | Bin 0 -> 178 bytes testapps/php80_extensions/tests/EvTest.php | 43 + testapps/php80_extensions/tests/EventTest.php | 27 + .../tests/ExtensionsLoadedTest.php | 53 + testapps/php80_extensions/tests/GdTest.php | 37 + testapps/php80_extensions/tests/GmpTest.php | 34 + .../php80_extensions/tests/ImagickTest.php | 35 + testapps/php80_extensions/tests/OauthTest.php | 27 + .../php80_extensions/tests/ProtobufTest.php | 27 + .../php80_extensions/tests/RdkafkaTest.php | 27 + testapps/php80_extensions/tests/bootstrap.php | 17 + testapps/php80_extensions_legacy/.gitignore | 1 + .../php80_extensions_legacy/Dockerfile.in | 15 + .../php80_extensions_legacy/composer.json | 37 + testapps/php80_extensions_legacy/php.ini | 14 + .../php80_extensions_legacy/phpunit.xml.dist | 8 + .../tests/Blank300.png | Bin 0 -> 178 bytes .../php80_extensions_legacy/tests/EvTest.php | 43 + .../tests/EventTest.php | 27 + .../tests/ExtensionsLoadedTest.php | 57 + .../php80_extensions_legacy/tests/GdTest.php | 37 + .../php80_extensions_legacy/tests/GmpTest.php | 34 + .../tests/ImagickTest.php | 35 + .../tests/OauthTest.php | 27 + .../tests/ProtobufTest.php | 27 + .../tests/RdkafkaTest.php | 27 + .../tests/bootstrap.php | 17 + testapps/php_default/php_default.yaml | 12 +- 240 files changed, 8773 insertions(+), 604 deletions(-) create mode 100644 NOTES.md create mode 100644 builder/gen-dockerfile/tests/test_data/php80/app.yaml create mode 100644 builder/gen-dockerfile/tests/test_data/php80/composer.json create mode 100644 check-versions/composer.lock create mode 100644 composer.lock create mode 100644 package-builder/debian/patches/php80-parse_str_harden.patch create mode 100644 package-builder/extensions/opencensus/debian/rules mode change 100644 => 100755 package-builder/extensions/skeleton/build.sh create mode 100755 package-builder/extensions/xmlrpc/build.sh create mode 100644 package-builder/extensions/xmlrpc/debian/compat create mode 100644 package-builder/extensions/xmlrpc/debian/control.in create mode 100644 package-builder/extensions/xmlrpc/debian/copyright create mode 100644 package-builder/extensions/xmlrpc/debian/ext-xmlrpc.ini create mode 100644 package-builder/extensions/xmlrpc/debian/gcp-php-xmlrpc.install.in create mode 100644 package-builder/extensions/xmlrpc/debian/rules.in create mode 100644 package-builder/gpgkeys/php80/gcaruso.key create mode 100644 package-builder/gpgkeys/php80/sgolemon.key create mode 100755 package-builder/libraries/librabbitmq/build.sh create mode 100644 package-builder/libraries/librabbitmq/debian/compat create mode 100644 package-builder/libraries/librabbitmq/debian/control create mode 100644 package-builder/libraries/librabbitmq/debian/copyright create mode 100755 package-builder/libraries/librabbitmq/debian/librabbitmq-dev.install create mode 100755 package-builder/libraries/librabbitmq/debian/librabbitmq.install create mode 100755 package-builder/libraries/librabbitmq/debian/librabbitmq.links create mode 100755 package-builder/libraries/librabbitmq/debian/rules create mode 100644 php-base/build-scripts/composer.json create mode 100755 php-base/build-scripts/install_php80.sh create mode 100644 php-base/tests/samples/oauth.json create mode 100644 php-versioned/php80.yaml create mode 100644 testapps/php80_custom/.gitignore create mode 100644 testapps/php80_custom/Dockerfile.in create mode 100644 testapps/php80_custom/composer.json create mode 100644 testapps/php80_custom/php80.yaml create mode 100644 testapps/php80_custom/tests/composer.json create mode 100644 testapps/php80_custom/tests/composer.lock create mode 100644 testapps/php80_custom/tests/phpunit.xml.dist create mode 100644 testapps/php80_custom/tests/tests/PHP80CustomTest.php create mode 100644 testapps/php80_custom/tests/tests/bootstrap.php create mode 100644 testapps/php80_custom/web/Blank300.png create mode 100644 testapps/php80_custom/web/apc.php create mode 100644 testapps/php80_custom/web/app.php create mode 100644 testapps/php80_custom/web/extensions.php create mode 100644 testapps/php80_custom/web/imagick.php create mode 100644 testapps/php80_custom/web/parse_str.php create mode 100644 testapps/php80_e2e/.gitignore create mode 100644 testapps/php80_e2e/Dockerfile.in create mode 100644 testapps/php80_e2e/app.yaml create mode 100644 testapps/php80_e2e/composer.json create mode 100644 testapps/php80_e2e/tests/composer.json create mode 100644 testapps/php80_e2e/tests/phpunit.xml.dist create mode 100644 testapps/php80_e2e/tests/tests/EndToEndTest.php create mode 100644 testapps/php80_e2e/tests/tests/bootstrap.php create mode 100644 testapps/php80_e2e/web/exec.php create mode 100644 testapps/php80_e2e/web/grpc_pubsub.php create mode 100644 testapps/php80_e2e/web/https-env.php create mode 100644 testapps/php80_e2e/web/index.php create mode 100644 testapps/php80_e2e/web/pdo_sqlite.php create mode 100644 testapps/php80_e2e/web/phpinfo.php create mode 100644 testapps/php80_e2e/web/session.php create mode 100644 testapps/php80_e2e/web/session_save_handler.php create mode 100644 testapps/php80_extensions/.gitignore create mode 100644 testapps/php80_extensions/Dockerfile.in create mode 100644 testapps/php80_extensions/composer.json create mode 100644 testapps/php80_extensions/phpunit.xml.dist create mode 100644 testapps/php80_extensions/tests/Blank300.png create mode 100644 testapps/php80_extensions/tests/EvTest.php create mode 100644 testapps/php80_extensions/tests/EventTest.php create mode 100644 testapps/php80_extensions/tests/ExtensionsLoadedTest.php create mode 100644 testapps/php80_extensions/tests/GdTest.php create mode 100644 testapps/php80_extensions/tests/GmpTest.php create mode 100644 testapps/php80_extensions/tests/ImagickTest.php create mode 100644 testapps/php80_extensions/tests/OauthTest.php create mode 100644 testapps/php80_extensions/tests/ProtobufTest.php create mode 100644 testapps/php80_extensions/tests/RdkafkaTest.php create mode 100644 testapps/php80_extensions/tests/bootstrap.php create mode 100644 testapps/php80_extensions_legacy/.gitignore create mode 100644 testapps/php80_extensions_legacy/Dockerfile.in create mode 100644 testapps/php80_extensions_legacy/composer.json create mode 100644 testapps/php80_extensions_legacy/php.ini create mode 100644 testapps/php80_extensions_legacy/phpunit.xml.dist create mode 100644 testapps/php80_extensions_legacy/tests/Blank300.png create mode 100644 testapps/php80_extensions_legacy/tests/EvTest.php create mode 100644 testapps/php80_extensions_legacy/tests/EventTest.php create mode 100644 testapps/php80_extensions_legacy/tests/ExtensionsLoadedTest.php create mode 100644 testapps/php80_extensions_legacy/tests/GdTest.php create mode 100644 testapps/php80_extensions_legacy/tests/GmpTest.php create mode 100644 testapps/php80_extensions_legacy/tests/ImagickTest.php create mode 100644 testapps/php80_extensions_legacy/tests/OauthTest.php create mode 100644 testapps/php80_extensions_legacy/tests/ProtobufTest.php create mode 100644 testapps/php80_extensions_legacy/tests/RdkafkaTest.php create mode 100644 testapps/php80_extensions_legacy/tests/bootstrap.php diff --git a/.gitignore b/.gitignore index c4b5058e..cc46a44d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .php_cs.cache builder/php-test.yaml deb-package-builder/pkg/ +.vscode/launch.json +workspace.code-workspace diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 00000000..31f35f94 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,153 @@ +# Notes + +When using Cloud Build for `build_packages.sh`, any of the packages that are built are not saved until the build completes for a PHP version. Some of the libraries and extensions can take quite a while to build on Cloud Build - libv8, grpc, for example. + +You can build those locally and upload them to the Bucket for Build Packages mentioned below and then run Cloud Build and it will create the rest in the same bucket. + +## GCP Requirements + +A Google Cloud Project +`gsutil` and `gcloud` installed and configured. + +Permissions and APIs enabled for: +- Cloud Build +- Cloud Storage + - Bucket for Build Packages *i.e. {your-unique-id}-php-mvm-a* + - Bucket for Distributions *i.e. {your-unique-id}-gcp-php-packages* +- Container Registry + - Built Images/Containers will be tagged, uploaded and affiliated with your GCP Project ID *i.e. gcr.io/your-project-123457/php* + +## Building Packages +*see README in package-builder* + +## Uploading Local Packages to GCS +After building the packages locally (php, extensions, libraries), you can upload the built artifacts directly to the `*-php-mvm-a` bucket. + +Navigate to the local directory where the `deb-package-builder` Docker image saved the packages that have been built, *i.e.* + +```bash +cd ~/gcloud/packages/pkg +gsutil -m rsync -d -r ./ gs://{your-unique-id}-php-mvm-a/ubuntu-packages +``` + +## Creating the Runtime Distribution + +Processes packages for each version of php, their extensions and the shared libraries from the `*-php-mvm-a` gcs bucket and bundles them into distributions in the `*-gcp-php-packages` bucket. + +Distributions include: stable, unstable and one according to the build time. These are used when building the Docker images later. + +**Environment Variables:** + +Specify the following variables when issuing commands or add them to your +environment: + +**DEB_TMP_DIR** + +> Directory on host OS where packages will be downloaded +`/home/{user}/tmp/php-build` + +**UBUNTU_GCS_PATH** +> Google Cloud Storage Bucket from your GC Project used while +> building packages with Cloud Build (full path) +> `gs://{your-unique-id}-php-mvm-a/ubuntu-packages` + +**GCP_PACKAGE_BUCKET** +> Google Cloud Storage Bucket from your project that hosts the +> runtime distribution for stable, unstable and each build +> (collection of > deb packages) (fully qualified path) +> `gs://{your-unique-id}-gcp-php-packages` + +**Parameters** + `debian` (default) OR `ubuntu` + +**Steps** +```bash +cd php-docker + +DEB_TMP_DIR="/home/{user}/gcloud/tmp/php-build" \ +UBUNTU_GCS_PATH="gs://{your-unique-id}-php-mvm-a/ubuntu-packages" \ +GCP_PACKAGE_BUCKET="{your-unique-id}-gcp-php-packages" \ +./scripts/update-gcs.sh ubuntu +``` +## Generating Images, Running Tests +**Environment Variables:** + +**TAG** +> Unique Identifier for the built images? (latest or custom?) + +**Steps** +```bash +cd php-docker +GCP_PACKAGE_BUCKET={your_unique_id}-gcp-php-packages TAG={custom-tag} GOOGLE_PROJECT_ID=your-project-123456 ./scripts/build_images.sh +``` + +## TODO +- Build Process (`php-docker/package-builder`) + - Scripts + - Review Changes/Additions to `functions.sh` + - [x] `download_from_git` - still needed in interim + - Libraries + - [x] Fix Packaging for librabbitmq + - [x] Remove Build of libvips, use bionic version + - Extensions + - References + - [Pagely PHP Versions and Supported Extensions](https://support.pagely.com/hc/en-us/articles/360057574951-PHP-Versions-and-Supported-Extensions-Reference) + - apcu + - [x] Enabled in php8.0 + - apcu_bc + - [x] Obsolete in php8.0 + - cassandra + - [x] Fix invalid symlink for libcassandra.so + - jsond/jsonc + - included natively in 7.4+ + - Sodium + - [ ] Enabled and test in 7.4 and 8.0 + - Phalcon + - Requires v5.0 to be released for php8 support + - [ ] PhalconTest removed for 8.0, determine how to skip/ignore + - php-80 + - [ ] amqp + - [ ] Test + - [x] apcu + - [ ] cassandra + - [ ] hprose + - [ ] lua + - [ ] phalcon + - [ ] stackdriver_debugger + - [ ] Test + - [ ] Submit PR + - [ ] tcpwrap + - [ ] v8js + - [x] vips + - [x] xmlrpc - added as extension + - [x] xsl - part of xml,dom +- Tests + - Structure + - Switched to [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) + - Fix licensing tests or exclude the couple of packages causing an issue? + - [ ] php-73 + - [ ] php-74 + - [ ] php-80 + - Cannot find the copyright files for the following libraries + - libext2fs `/usr/share/doc/libext2fs/copyright` + - libssl-dev `../libssl1.1/copyright` in `/usr/share/doc/libssl-dev/copyright` + - openssl `../libssl1.1/copyright` in `/usr/share/doc/openssl/copyright` + - Extension + - [ ] php-73 + - [ ] php-74 + - [ ] php-80 + - Legacy Extension + - [ ] php-73 + - [ ] php-74 + - [ ] php-80 + - Custom + - [ ] php-73 + - [ ] php-74 + - [ ] php-80 + - Travis - check_versions + - `VersionTest.php` + - [x] Fix failures when searching for gcp-phpXX packages + - [x] Need to point to custom built artifacts, not ones affiliated with Google. + - [x] Reconfigure travis settings for testing custom build, if necessary +- nginx + - [ ] Determine how to enable `ngx_http_lua_module` for bionic nginx OR determine if using PPA `ondrej/nginx-mainline` is suitable. (*see* `php-base/nginx.conf`) diff --git a/builder/gen-dockerfile/Dockerfile.in b/builder/gen-dockerfile/Dockerfile.in index f793a6d7..4f920345 100644 --- a/builder/gen-dockerfile/Dockerfile.in +++ b/builder/gen-dockerfile/Dockerfile.in @@ -15,7 +15,7 @@ # Dockerfile for PHP builder step 1 # Creates Dockerfile and .dockerignore -FROM ${PHP_71_IMAGE} +FROM ${PHP_80_IMAGE} RUN mkdir /builder COPY . /builder diff --git a/builder/gen-dockerfile/phpunit.xml.dist b/builder/gen-dockerfile/phpunit.xml.dist index 8ded8984..f17c4af4 100644 --- a/builder/gen-dockerfile/phpunit.xml.dist +++ b/builder/gen-dockerfile/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/builder/gen-dockerfile/src/Builder/GenFilesCommand.php b/builder/gen-dockerfile/src/Builder/GenFilesCommand.php index cc9fddf1..3d399725 100644 --- a/builder/gen-dockerfile/src/Builder/GenFilesCommand.php +++ b/builder/gen-dockerfile/src/Builder/GenFilesCommand.php @@ -58,40 +58,22 @@ protected function configure() ->setName('create') ->setDescription('Create Dockerfile and .dockerignore file') ->addOption( - 'php74-image', - null, - InputOption::VALUE_REQUIRED, - 'The PHP 74 base image of the Dockerfile' - ) - ->addOption( - 'php73-image', - null, - InputOption::VALUE_REQUIRED, - 'The PHP 73 base image of the Dockerfile' - ) - ->addOption( - 'php72-image', + 'php80-image', null, InputOption::VALUE_REQUIRED, - 'The PHP 72 base image of the Dockerfile' + 'The PHP 80 base image of the Dockerfile' ) ->addOption( - 'php71-image', - null, - InputOption::VALUE_REQUIRED, - 'The PHP 71 base image of the Dockerfile' - ) - ->addOption( - 'php70-image', + 'php74-image', null, InputOption::VALUE_REQUIRED, - 'The PHP 70 base image of the Dockerfile' + 'The PHP 74 base image of the Dockerfile' ) ->addOption( - 'php56-image', + 'php73-image', null, InputOption::VALUE_REQUIRED, - 'The PHP 56 base image of the Dockerfile' + 'The PHP 73 base image of the Dockerfile' ) ->addOption( 'workspace', @@ -117,32 +99,27 @@ 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.4.x version. +uses the latest 8.0.x version. We recommend pinning your PHP version by running: -composer require php 7.4.* (replace it with your desired minor version) +composer require php 8.0.* (replace it with your desired minor version) -Using PHP version 7.4.x... +Using PHP version 8.0.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.4.*'." + "PHP version to a minor version such as '8.0.*'." ); } - if (substr($version, 0, 3) === '5.6') { - $this->detectedPhpVersion = '5.6'; - } elseif (substr($version, 0, 3) === '7.0') { - $this->detectedPhpVersion = '7.0'; - } elseif (substr($version, 0, 3) === '7.1') { - $this->detectedPhpVersion = '7.1'; - } elseif (substr($version, 0, 3) === '7.2') { - $this->detectedPhpVersion = '7.2'; - } elseif (substr($version, 0, 3) === '7.3') { + if (substr($version, 0, 3) === '7.3') { $this->detectedPhpVersion = '7.3'; - } else { + } elseif (substr($version, 0, 3) === '7.4') { $this->detectedPhpVersion = '7.4'; + } else { + $this->detectedPhpVersion = '8.0'; } + $yamlPath = getenv('GAE_APPLICATION_YAML_PATH') ?: self::DEFAULT_YAML_PATH; if (file_exists($this->workspace . '/' . $yamlPath)) { diff --git a/builder/gen-dockerfile/src/DetectPhpVersion.php b/builder/gen-dockerfile/src/DetectPhpVersion.php index dc782906..7f23f495 100644 --- a/builder/gen-dockerfile/src/DetectPhpVersion.php +++ b/builder/gen-dockerfile/src/DetectPhpVersion.php @@ -98,10 +98,9 @@ public static function isExactVersion($constraint) private static function detectAvailableVersions() { return [ + trim(file_get_contents('/opt/php80_version')), trim(file_get_contents('/opt/php74_version')), trim(file_get_contents('/opt/php73_version')), - trim(file_get_contents('/opt/php72_version')), - trim(file_get_contents('/opt/php71_version')), ]; } } diff --git a/builder/gen-dockerfile/tests/GenFilesCommandTest.php b/builder/gen-dockerfile/tests/GenFilesCommandTest.php index 576379fb..cee6e59b 100644 --- a/builder/gen-dockerfile/tests/GenFilesCommandTest.php +++ b/builder/gen-dockerfile/tests/GenFilesCommandTest.php @@ -31,7 +31,7 @@ class GenFilesCommandTest extends TestCase 'composer.json' ]; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$testDir = tempnam(sys_get_temp_dir(), 'GenFilesTest'); if (file_exists(self::$testDir)) { @@ -40,18 +40,18 @@ public static function setUpBeforeClass() mkdir(self::$testDir); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { rmdir(self::$testDir); } - public function setUp() + public function setUp(): void { // Set default envvar putenv('GAE_APPLICATION_YAML_PATH=app.yaml'); } - public function tearDown() + public function tearDown(): void { foreach (self::$files as $file) { if (file_exists(self::$testDir . '/' . $file)) { @@ -76,10 +76,9 @@ public function testGenFilesCommand( if ($baseImages === null) { $baseImages = [ - '--php71-image' => 'gcr.io/google-appengine/php71:latest', - '--php72-image' => 'gcr.io/google-appengine/php72:latest', '--php73-image' => 'gcr.io/google-appengine/php73:latest', '--php74-image' => 'gcr.io/google-appengine/php74:latest', + '--php80-image' => 'gcr.io/google-appengine/php80:latest', ]; } if ($expectedException !== null) { @@ -102,23 +101,23 @@ public function testGenFilesCommand( $dockerfile = file_get_contents(self::$testDir . '/Dockerfile'); $this->assertNotFalse($dockerfile, 'Dockerfile should exist'); - $this->assertContains( + $this->assertStringContainsString( "DOCUMENT_ROOT='$expectedDocRoot'", $dockerfile ); - $this->assertContains('FROM ' . $expectedFrom, $dockerfile); + $this->assertStringContainsString('FROM ' . $expectedFrom, $dockerfile); $genFiles->createDockerignore(); $dockerignore = file_get_contents(self::$testDir . '/.dockerignore'); $this->assertNotFalse($dockerignore, '.dockerignore should exist'); - $this->assertContains( + $this->assertStringContainsString( $expectedDockerIgnore, $dockerignore ); if (!empty($appYamlEnv)) { - $this->assertContains($appYamlEnv, $dockerignore); + $this->assertStringContainsString($appYamlEnv, $dockerignore); } foreach ($otherExpectations as $expectation) { - $this->assertContains($expectation, $dockerfile); + $this->assertStringContainsString($expectation, $dockerfile); } } @@ -132,10 +131,10 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.4' \n" + "DETECTED_PHP_VERSION='8.0' \n" ] ], [ @@ -145,11 +144,11 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", "SKIP_LOCKDOWN_DOCUMENT_ROOT='true' \\\n", - "DETECTED_PHP_VERSION='7.4' \n" + "DETECTED_PHP_VERSION='8.0' \n" ] ], [ @@ -170,10 +169,10 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', ["COMPOSER_FLAGS='--prefer-dist --no-dev --no-script' \\\n", "FRONT_CONTROLLER_FILE='index.php' \\\n", - "DETECTED_PHP_VERSION='7.4' \n" + "DETECTED_PHP_VERSION='8.0' \n" ] ], [ @@ -187,19 +186,6 @@ public function dataProvider() [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\InvalidComposerFlagsException' ], - [ - // 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" - ] - ], [ // PHP 7.3 __DIR__ . '/test_data/php73', @@ -226,6 +212,19 @@ public function dataProvider() "DETECTED_PHP_VERSION='7.4' \n" ] ], + [ + // PHP 8.0 + __DIR__ . '/test_data/php80', + null, + '', + '/app', + 'added by the php runtime builder', + 'gcr.io/google-appengine/php80:latest', + ["COMPOSER_FLAGS='--no-dev --prefer-dist' \\\n", + "FRONT_CONTROLLER_FILE='index.php' \\\n", + "DETECTED_PHP_VERSION='8.0' \n" + ] + ], [ // values on env_variables __DIR__ . '/test_data/values_only_on_env', @@ -233,7 +232,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', [ "WHITELIST_FUNCTIONS='exec' \\\n", "FRONT_CONTROLLER_FILE='app.php'", @@ -253,7 +252,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\MissingDocumentRootException' ], @@ -264,7 +263,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', [ "WHITELIST_FUNCTIONS='exec' \\\n", "FRONT_CONTROLLER_FILE='app.php'", @@ -285,7 +284,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', ["FRONT_CONTROLLER_FILE='app.php' \\\n"] ], [ @@ -295,23 +294,20 @@ public function dataProvider() 'my.yaml', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest' + 'gcr.io/google-appengine/php80:latest' ], [ // Overrides baseImage __DIR__ . '/test_data/simplest', [ - '--php56-image' => 'gcr.io/php-mvm-a-28051/php56:latest', - '--php70-image' => 'gcr.io/php-mvm-a-28051/php70:latest', - '--php71-image' => 'gcr.io/php-mvm-a-28051/php71:latest', - '--php72-image' => 'gcr.io/php-mvm-a-28051/php72:latest', '--php73-image' => 'gcr.io/php-mvm-a-28051/php73:latest', '--php74-image' => 'gcr.io/php-mvm-a-28051/php74:latest', + '--php80-image' => 'gcr.io/php-mvm-a-28051/php80:latest', ], '', '/app', 'added by the php runtime builder', - 'gcr.io/php-mvm-a-28051/php74:latest' + 'gcr.io/php-mvm-a-28051/php80:latest' ], [ // Has document_root set @@ -320,7 +316,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest' + 'gcr.io/google-appengine/php80:latest' ], [ // Has document_root set in env_variables @@ -329,7 +325,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest' + 'gcr.io/google-appengine/php80:latest' ], [ // document_root in both will throw exception @@ -338,7 +334,7 @@ public function dataProvider() '', '/app/web', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\EnvConflictException' ], @@ -358,7 +354,7 @@ public function dataProvider() '', '/app', 'added by the php runtime builder', - 'gcr.io/google-appengine/php74:latest', + 'gcr.io/google-appengine/php80:latest', [], '\\Google\\Cloud\\Runtimes\\Builder\\Exception\\ExactVersionException' ] diff --git a/builder/gen-dockerfile/tests/test_data/php80/app.yaml b/builder/gen-dockerfile/tests/test_data/php80/app.yaml new file mode 100644 index 00000000..2359f78c --- /dev/null +++ b/builder/gen-dockerfile/tests/test_data/php80/app.yaml @@ -0,0 +1,5 @@ +env: flex +runtime: php + +runtime_config: + document_root: /app diff --git a/builder/gen-dockerfile/tests/test_data/php80/composer.json b/builder/gen-dockerfile/tests/test_data/php80/composer.json new file mode 100644 index 00000000..85bd4d3b --- /dev/null +++ b/builder/gen-dockerfile/tests/test_data/php80/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "php": "8.0.*" + } +} diff --git a/builder/php-latest.yaml b/builder/php-latest.yaml index e015ece7..2e22cd9b 100644 --- a/builder/php-latest.yaml +++ b/builder/php-latest.yaml @@ -1,6 +1,6 @@ steps: - name: 'gcr.io/gcp-runtimes/php/gen-dockerfile:latest' - args: ['--php74-image', 'gcr.io/google-appengine/php74:latest', '--php73-image', 'gcr.io/google-appengine/php73:latest', '--php72-image', 'gcr.io/google-appengine/php72:latest', '--php71-image', 'gcr.io/google-appengine/php71:latest', '--php70-image', 'gcr.io/google-appengine/php70:latest', '--php56-image', 'gcr.io/google-appengine/php56:latest'] + args: ['--php80-image', 'gcr.io/google-appengine/php80:latest', '--php74-image', 'gcr.io/google-appengine/php74:latest', '--php73-image', 'gcr.io/google-appengine/php73:latest'] env: 'GAE_APPLICATION_YAML_PATH=$_GAE_APPLICATION_YAML_PATH' - name: 'gcr.io/kaniko-project/executor:v0.6.0' args: ['--destination=$_OUTPUT_IMAGE'] diff --git a/check-versions/cloudbuild.yaml b/check-versions/cloudbuild.yaml index 2379837e..ed09aac6 100644 --- a/check-versions/cloudbuild.yaml +++ b/check-versions/cloudbuild.yaml @@ -1,4 +1,4 @@ steps: - name: gcr.io/cloud-builders/docker - args: ['pull', 'gcr.io/google-appengine/php'] + args: ['pull', 'gcr.io/${_CONTAINER_REGISTRY}/php'] - name: ${_TEST_RUNNER} diff --git a/check-versions/composer.lock b/check-versions/composer.lock new file mode 100644 index 00000000..3a4aa40c --- /dev/null +++ b/check-versions/composer.lock @@ -0,0 +1,564 @@ +{ + "_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#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "7a12869adba2f709560fabbdf077d9f5", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.5", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "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 is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, + "time": "2020-06-16T21:01:06+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-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" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.1" + }, + "time": "2021-03-21T16:25:00+00:00" + }, + { + "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" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "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 backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/check-versions/phpunit.xml.dist b/check-versions/phpunit.xml.dist index 8ded8984..ec61984e 100644 --- a/check-versions/phpunit.xml.dist +++ b/check-versions/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/check-versions/tests/VersionTest.php b/check-versions/tests/VersionTest.php index 7d6bd116..47e1ebba 100644 --- a/check-versions/tests/VersionTest.php +++ b/check-versions/tests/VersionTest.php @@ -22,23 +22,16 @@ class VersionTest extends TestCase { private static $versions; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$versions = array(); $client = new Client(['base_uri' => 'http://www.php.net']); $response = $client->request('GET', '/downloads.php'); $body = $response->getBody(); - - $pattern = '/PHP (7\.1\.\d+)/'; - if (preg_match($pattern, $body, $matches)) { - self::$versions['php71'] = $matches[1]; - } else { - self::$versions['php71'] = - 'Failed to detect the latest PHP71 version'; - } - $pattern = '/PHP (7\.3\.\d+)/'; + if (preg_match($pattern, $body, $matches)) { + echo "setUp => 7.3 -> matched\n"; self::$versions['php73'] = $matches[1]; } else { self::$versions['php73'] = @@ -47,29 +40,39 @@ public static function setUpBeforeClass() $pattern = '/PHP (7\.4\.\d+)/'; if (preg_match($pattern, $body, $matches)) { + echo "setUp => 7.4 -> matched\n"; self::$versions['php74'] = $matches[1]; } else { self::$versions['php74'] = 'Failed to detect the latest PHP74 version'; } + $pattern = '/PHP (8\.0\.\d+)/'; + if (preg_match($pattern, $body, $matches)) { + echo "setUp => 8.0 -> matched\n"; + self::$versions['php80'] = $matches[1]; + } else { + self::$versions['php80'] = + 'Failed to detect the latest PHP80 version'; + } + echo "versions: " . json_encode(self::$versions, JSON_PRETTY_PRINT) . "\n"; exec('apt-get update'); - } + $output = []; + exec('apt-cache search gcp-php', $output); + echo json_encode($output, JSON_PRETTY_PRINT) . "\n"; - public function testPHP71Version() - { - $output = exec('apt-cache madison gcp-php71'); - $pattern = '/(7\.1\.\d+)/'; - if (preg_match($pattern, $output, $matches)) { - $this->assertEquals($matches[1], self::$versions['php71']); - } else { - $this->fail('Failed to detect the current php71 version'); + foreach (self::$versions as $key => $version) { + exec("apt-cache policy gcp-$key", $output); + echo json_encode($output, JSON_PRETTY_PRINT) . "\n"; } } public function testPHP73Version() { - $output = exec('apt-cache madison gcp-php73'); + $eoutput = []; + exec('apt-cache policy gcp-php73', $eoutput); + $output = json_encode($eoutput); + $pattern = '/(7\.3\.\d+)/'; if (preg_match($pattern, $output, $matches)) { $this->assertEquals($matches[1], self::$versions['php73']); @@ -80,7 +83,10 @@ public function testPHP73Version() public function testPHP74Version() { - $output = exec('apt-cache madison gcp-php74'); + $eoutput = []; + exec('apt-cache policy gcp-php74', $eoutput); + $output = json_encode($eoutput); + $pattern = '/(7\.4\.\d+)/'; if (preg_match($pattern, $output, $matches)) { $this->assertEquals($matches[1], self::$versions['php74']); @@ -88,4 +94,18 @@ public function testPHP74Version() $this->fail('Failed to detect the current php74 version'); } } + + public function testPHP80Version() + { + $eoutput = []; + exec('apt-cache policy gcp-php80', $eoutput); + $output = json_encode($eoutput); + $pattern = '/(8\.0\.\d+)/'; + + if (preg_match($pattern, $output, $matches)) { + $this->assertEquals($matches[1], self::$versions['php80']); + } else { + $this->fail('Failed to detect the current php80 version'); + } + } } diff --git a/circle.yml b/circle.yml index 43b87907..cbae8dd9 100644 --- a/circle.yml +++ b/circle.yml @@ -12,7 +12,7 @@ machine: GOOGLE_PROJECT_ID: php-mvm-a E2E_PROJECT_ID: php-mvm-a TAG: circle-${CIRCLE_BUILD_NUM} - RUNTIME_DISTRIBUTION: gcp-php-runtime-xenial-unstable + RUNTIME_DISTRIBUTION: gcp-php-runtime-bionic-unstable BUILDER_TARGET_IMAGE: gcr.io/${GOOGLE_PROJECT_ID}/php RUN_E2E_TESTS: true diff --git a/cloudbuild-test-runner/Dockerfile.in b/cloudbuild-test-runner/Dockerfile.in index 8e9a96d0..60ed34c9 100644 --- a/cloudbuild-test-runner/Dockerfile.in +++ b/cloudbuild-test-runner/Dockerfile.in @@ -24,7 +24,7 @@ COPY test-runner-php.ini /opt/php/lib/conf.d # Install PHP and tools RUN apt-get update && \ apt-get -y install wget zip && \ - wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-5.7.phar && \ + wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-9.phar && \ chmod +x phpunit.phar && \ mv phpunit.phar /usr/local/bin/phpunit && \ wget -nv https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip && \ diff --git a/cloudbuild-ubuntu.yaml b/cloudbuild-ubuntu.yaml index a3746ebb..d7d109ea 100644 --- a/cloudbuild-ubuntu.yaml +++ b/cloudbuild-ubuntu.yaml @@ -7,7 +7,7 @@ steps: # grab gcp-php packages from GCS - name: google/cloud-sdk:252.0.0-slim - args: ['gsutil', '-m', 'cp', '-r', 'gs://gcp-php-packages/$_RUNTIME_DISTRIBUTION', '/workspace/php-base'] + args: ['gsutil', '-m', 'cp', '-r', 'gs://$_GCP_PACKAGE_BUCKET/$_RUNTIME_DISTRIBUTION', '/workspace/php-base'] waitFor: ['-'] id: gsutil @@ -17,19 +17,30 @@ steps: dir: php-base waitFor: ['gsutil'] id: php-base - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG', '--config', '/workspace/php-base/php-base.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG', '--config', '/workspace/php-base/php-base.yaml', '-v', 'debug'] waitFor: ['php-base'] id: php-base-structure + # php80 + - name: gcr.io/cloud-builders/docker + args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG', '--build-arg', 'PHP_VERSION=8.0', '.'] + dir: php-versioned + waitFor: ['php-base'] + id: php80 + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG', '--config', '/workspace/php-versioned/php80.yaml', '-v', 'debug'] + waitFor: ['php80'] + id: php80-structure + # php74 - name: gcr.io/cloud-builders/docker args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG', '--build-arg', 'PHP_VERSION=7.4', '.'] dir: php-versioned waitFor: ['php-base'] id: php74 - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG', '--config', '/workspace/php-versioned/php74.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG', '--config', '/workspace/php-versioned/php74.yaml', '-v', 'debug'] waitFor: ['php74'] id: php74-structure @@ -39,38 +50,16 @@ steps: dir: php-versioned waitFor: ['php-base'] id: php73 - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG', '--config', '/workspace/php-versioned/php73.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG', '--config', '/workspace/php-versioned/php73.yaml', '-v', 'debug'] waitFor: ['php73'] id: php73-structure - # php72 - - name: gcr.io/cloud-builders/docker - args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG', '--build-arg', 'PHP_VERSION=7.2', '.'] - dir: php-versioned - waitFor: ['php-base'] - id: php72 - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG', '--config', '/workspace/php-versioned/php72.yaml', '-v'] - waitFor: ['php72'] - id: php72-structure - - # php71 - - name: gcr.io/cloud-builders/docker - args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG', '--build-arg', 'PHP_VERSION=7.1', '.'] - dir: php-versioned - waitFor: ['php-base'] - id: php71 - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG', '--config', '/workspace/php-versioned/php71.yaml', '-v'] - waitFor: ['php71'] - id: php71-structure - # test runner - name: gcr.io/cloud-builders/docker args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '.'] dir: cloudbuild-test-runner - waitFor: ['php71-structure'] + waitFor: ['php80-structure'] id: test-runner # base tests @@ -83,10 +72,10 @@ steps: - name: gcr.io/cloud-builders/docker args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '.'] dir: php-onbuild - waitFor: ['php71'] + waitFor: ['php80'] id: php-onbuild - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '--config', '/workspace/php-onbuild/php.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '--config', '/workspace/php-onbuild/php.yaml', '-v', 'debug'] waitFor: ['php-onbuild'] id: php-onbuild-structure @@ -100,7 +89,7 @@ steps: args: ['run', '-v', '/workspace/builder/gen-dockerfile:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG'] waitFor: ['test-runner'] - name: gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG - args: ['--workspace', '/workspace/testapps/builder_test', '--php71-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG'] + args: ['--workspace', '/workspace/testapps/builder_test', '--php73-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG'] waitFor: ['gen-dockerfile'] id: gen-dockerfile-run - name: gcr.io/cloud-builders/docker @@ -114,28 +103,28 @@ steps: dir: testapps/php_default waitFor: ['php-onbuild'] id: php-default-build - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-default:$_TAG', '--config', 'php_default.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-default:$_TAG', '--config', '/workspace/testapps/php_default/php_default.yaml', '-v', 'debug'] waitFor: ['php-default-build'] id: php-default-test - # php71-custom test + # php80-custom test - name: gcr.io/cloud-builders/docker - args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG', '.'] - dir: testapps/php71_custom + args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG', '.'] + dir: testapps/php80_custom waitFor: ['php-onbuild'] - id: php71-custom-build - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG', '--config', 'php71.yaml', '-v'] - waitFor: ['php71-custom-build'] - - name: gcr.io/cloud-builders/docker - args: ['run', '--net=nw_$_TAG', '--name=php71-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG'] - waitFor: ['php71-custom-build', 'test-network'] - id: php71-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/php71_custom/tests'] - waitFor: ['php71-custom-app', 'test-runner'] - id: php71-custom-test + id: php80-custom-build + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG', '--config', '/workspace/testapps/php80_custom/php80.yaml', '-v', 'debug'] + waitFor: ['php80-custom-build'] + - name: gcr.io/cloud-builders/docker + args: ['run', '--net=nw_$_TAG', '--name=php80-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG'] + waitFor: ['php80-custom-build', 'test-network'] + id: php80-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/php80_custom/tests'] + waitFor: ['php80-custom-app', 'test-runner'] + id: php80-custom-test # php74-custom test - name: gcr.io/cloud-builders/docker @@ -143,8 +132,8 @@ steps: dir: testapps/php74_custom waitFor: ['php-onbuild'] id: php74-custom-build - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG', '--config', 'php74.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG', '--config', '/workspace/testapps/php74_custom/php74.yaml', '-v', 'debug'] waitFor: ['php74-custom-build'] - name: gcr.io/cloud-builders/docker args: ['run', '--net=nw_$_TAG', '--name=php74-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG'] @@ -161,8 +150,8 @@ steps: dir: testapps/php73_custom waitFor: ['php-onbuild'] id: php73-custom-build - - name: gcr.io/gcp-runtimes/structure_test - args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG', '--config', 'php73.yaml', '-v'] + - name: gcr.io/gcp-runtimes/container-structure-test + args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG', '--config', '/workspace/testapps/php73_custom/php73.yaml', '-v', 'debug'] waitFor: ['php73-custom-build'] - name: gcr.io/cloud-builders/docker args: ['run', '--net=nw_$_TAG', '--name=php73-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG'] @@ -173,60 +162,6 @@ steps: waitFor: ['php73-custom-app', 'test-runner'] id: php73-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', '.'] - dir: testapps/php71_extensions - waitFor: ['php-onbuild'] - id: php71-extensions-build - - name: gcr.io/cloud-builders/docker - args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-extensions:$_TAG', 'vendor/bin/phpunit'] - dir: testapps/php71_extensions - waitFor: ['php71-extensions-build'] - id: php71-extensions-test - - # php72-extensions test - - name: gcr.io/cloud-builders/docker - args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', '.'] - dir: testapps/php72_extensions - waitFor: ['php-onbuild'] - id: php72-extensions-build - - name: gcr.io/cloud-builders/docker - args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', 'vendor/bin/phpunit'] - dir: testapps/php72_extensions - waitFor: ['php72-extensions-build'] - id: php72-extensions-test - - # php72-extensions-legacy test - - name: gcr.io/cloud-builders/docker - args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', '.'] - dir: testapps/php72_extensions_legacy - waitFor: ['php-onbuild'] - id: php72-extensions-legacy-build - - name: gcr.io/cloud-builders/docker - args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', 'vendor/bin/phpunit'] - dir: testapps/php72_extensions_legacy - waitFor: ['php72-extensions-build'] - id: php72-extensions-legacy-test - # php73-extensions test - name: gcr.io/cloud-builders/docker args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.'] @@ -248,7 +183,7 @@ steps: - name: gcr.io/cloud-builders/docker args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', 'vendor/bin/phpunit'] dir: testapps/php73_extensions_legacy - waitFor: ['php73-extensions-build'] + waitFor: ['php73-extensions-legacy-build'] id: php73-extensions-legacy-test # php74-extensions test @@ -275,14 +210,37 @@ steps: waitFor: [ 'php74-extensions-build' ] id: php74-extensions-legacy-test + # php80-extensions test - fix php80-vips + - name: gcr.io/cloud-builders/docker + args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', '.' ] + dir: testapps/php80_extensions + waitFor: [ 'php-onbuild' ] + id: php80-extensions-build + - name: gcr.io/cloud-builders/docker + args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', 'vendor/bin/phpunit' ] + dir: testapps/php80_extensions + waitFor: [ 'php80-extensions-build' ] + id: php80-extensions-test + + # php80-extensions-legacy test + - name: gcr.io/cloud-builders/docker + args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', '.' ] + dir: testapps/php80_extensions_legacy + waitFor: [ 'php-onbuild' ] + id: php80-extensions-legacy-build + - name: gcr.io/cloud-builders/docker + args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', 'vendor/bin/phpunit' ] + dir: testapps/php80_extensions_legacy + waitFor: [ 'php80-extensions-build' ] + id: php80-extensions-legacy-test + images: - gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG - gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG + - gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG - gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG - gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG - - gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG - - gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG - gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG - gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG diff --git a/composer.json b/composer.json index 8ef98c21..abef810a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,8 @@ { "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "phpunit/phpunit": "^4.8.35" + "friendsofphp/php-cs-fixer": "~2.0" + }, + "require": { + "phpunit/phpunit": "9.5.4" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..c7c62783 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4070 @@ +{ + "_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#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "90d305e6df05995aadbdb20420af40ba", + "packages": [ + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, + "time": "2020-06-27T14:33:11+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-23T07:16:29+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:18:59+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/semver", + "version": "3.2.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:59:24+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-09T19:40:06+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.12.1" + }, + "time": "2021-02-21T21:00:45+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.18.6", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "5fed214993e7863cef88a08f214344891299b9e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/5fed214993e7863cef88a08f214344891299b9e4", + "reference": "5fed214993e7863cef88a08f214344891299b9e4", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0 || ^8.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4.2", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.6" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-04-19T19:45:11+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, + "time": "2020-10-14T08:39:05+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "symfony/console", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/90374b8ed059325b49a29b55b3f8bb4062c87629", + "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-19T14:07:32+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "d08d6ec121a425897951900ab692b612a61d6240" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", + "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-18T17:12:37+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/056e92acc21d977c37e6ea8e97374b2a6c8551b0", + "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-01T10:42:13+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0d639a0943822626290d169965804f79400e6a04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04", + "reference": "0d639a0943822626290d169965804f79400e6a04", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-15T18:55:04+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T12:56:27+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "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 intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "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 backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "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 backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/process", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.3.0-BETA1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-08T10:27:02+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-01T10:43:52+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "d99310c33e833def36419c284f60e8027d359678" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d99310c33e833def36419c284f60e8027d359678", + "reference": "d99310c33e833def36419c284f60e8027d359678", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.3.0-BETA1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-29T15:28:41+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-17T17:12:15+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/integration-tests.yaml b/integration-tests.yaml index f5db3c08..1b727275 100644 --- a/integration-tests.yaml +++ b/integration-tests.yaml @@ -6,6 +6,17 @@ steps: waitFor: ['-'] id: test-runner + # php80_e2e test + - name: gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG + args: ['/workspace/testapps/php80_e2e/tests'] + waitFor: ['test-runner'] + id: php80_e2e + env: + - 'SERVICE_ACCOUNT_JSON=${_SERVICE_ACCOUNT_JSON}' + - 'TAG=${_TAG}-e2e' + - 'E2E_PROJECT_ID=${_E2E_PROJECT_ID}' + - 'TEST_VM_IMAGE=${_TEST_VM_IMAGE}' + # php74_e2e test - name: gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG args: ['/workspace/testapps/php74_e2e/tests'] diff --git a/package-builder/Dockerfile b/package-builder/Dockerfile index e9d8a041..4ee2f9df 100644 --- a/package-builder/Dockerfile +++ b/package-builder/Dockerfile @@ -14,10 +14,10 @@ # Dockerfile used to build php binaries. # Example usage: -# docker run -v /mydir:/workspace deb-package-builder 5.6.29-1,7.0.14-2 +# docker run -v /mydir:/workspace deb-package-builder 7.3.28-1,7.4.19-1,8.0.6-1 # Then you'll get deb packages in /mydir. -FROM gcr.io/gcp-runtimes/ubuntu_16_0_4 +FROM gcr.io/gcp-runtimes/ubuntu_18_0_4 ENV PHP_DIR=/opt/php \ PATH=/opt/php/bin:$PATH @@ -29,23 +29,29 @@ RUN apt-get update -y && \ git \ # PHP deps curl \ + libssl-dev \ + libssl1.1 \ + openssl \ libcurl3-gnutls \ gettext \ libbz2-1.0 \ libgmp10 \ - libicu55 \ + libicu60 \ libjpeg-turbo8 \ liblua5.3-0 \ libmcrypt4 \ libmemcached11 \ libmemcachedutil2 \ + libpcre2-dev \ + libpcre2-8-0 \ libpcre3 \ - libpng12-0 \ + libpng16-16 \ libpq5 \ - libreadline6 \ + libreadline7 \ librecode0 \ libsasl2-modules \ libsqlite3-0 \ + libvips-dev \ libxml2 \ libxslt1.1 \ sasl2-bin \ @@ -57,10 +63,9 @@ RUN apt-get update -y && \ # headers libbz2-dev \ libcurl4-gnutls-dev \ - libfreetype6-dev \ + libgd-dev \ libgettextpo-dev \ libgmp-dev \ - libuv1-dev \ libicu-dev \ libjpeg-turbo8-dev \ libjson-c-dev \ @@ -68,8 +73,8 @@ RUN apt-get update -y && \ libmagick++-dev \ libmcrypt-dev \ libmemcached-dev \ + libonig-dev \ libpcre3-dev \ - libpng-dev \ libpq-dev \ libreadline6-dev \ libreadline-dev \ @@ -77,30 +82,33 @@ RUN apt-get update -y && \ libsasl2-dev \ libsqlite3-dev \ libsodium-dev \ - libssl-dev \ + libvips-dev \ libxml2-dev \ libxslt1-dev \ - zlib1g-dev \ libzip-dev \ libzip4 \ - openssl \ + # out of date 1.0.2g -> nginx \ # build tools build-essential \ + dpkg-dev \ autoconf \ bison \ file \ flex \ - g++ \ - gcc \ + g++-8 \ + gcc-8 \ libc-dev \ make \ patch \ pkg-config \ re2c \ binutils \ + valgrind \ + # ampq build tools + ca-certificates \ + gnupg \ # build tools for cassandra - cmake \ dh-exec \ lsb-release \ fakeroot \ @@ -111,10 +119,21 @@ RUN apt-get update -y && \ software-properties-common \ apt-transport-https +RUN wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1_1.35.0-1_amd64.deb && \ + dpkg -i libuv1_1.35.0-1_amd64.deb + +RUN wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1-dev_1.35.0-1_amd64.deb && \ + dpkg -i libuv1-dev_1.35.0-1_amd64.deb + RUN wget -qO - https://packages.confluent.io/deb/5.0/archive.key | apt-key add - && \ add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.0 stable main" && \ apt-get update && apt-get install -y librdkafka-dev librdkafka1 +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | \ + tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ + add-apt-repository "deb [arch=amd64] https://apt.kitware.com/ubuntu/ bionic main" && \ + apt-get update && apt-get install -y cmake + COPY build.sh / RUN chmod 0755 /build.sh RUN mkdir -p /workspace diff --git a/package-builder/README.md b/package-builder/README.md index 011dc27b..09f995f6 100644 --- a/package-builder/README.md +++ b/package-builder/README.md @@ -4,7 +4,7 @@ This directory contains the code to build all of our debian packages for php and ## PHP Versions -We currently support the latest patch version of 5.6, 7.0, 7.1, and 7.2. See +We currently support the latest patch version of 7.3, 7.4 and 8.0. See [releases](https://github.com/GoogleCloudPlatform/php-docker/releases) for exact versions. ## Extensions @@ -19,12 +19,12 @@ We currently support the latest patch version of 5.6, 7.0, 7.1, and 7.2. See * ev * event * gprc -* hprose +* hprose (7.3, 7.4) * imagick * jsonc * jsond * krb5 -* libsodium (7.0, 7.1) +* libsodium (7.3) (built-in 7.4, 8.0) * lua (7.0+) * LZF * mailparse @@ -43,12 +43,12 @@ We currently support the latest patch version of 5.6, 7.0, 7.1, and 7.2. See * SeasLog * stackdriver_debugger * stomp -* suhosin +* suhosin (5.6) * swoole * sync * tcpwrap * timezonedb -* v8js (7.0+) +* v8js (7.3, 7.4) * vips (7.0+) * yaconf (7.0+) * yaf @@ -56,6 +56,7 @@ We currently support the latest patch version of 5.6, 7.0, 7.1, and 7.2. See ## Building Packages +### Cloud Build 1. Install `gcloud` utils. 2. `GOOGLE_PROJECT_ID=my_project_id ./build_packages.sh` @@ -65,6 +66,15 @@ uploaded to the bucket named `$BUCKET` (defaults to the project id). If you want to build for specific versions of PHP, set the `$PHP_VERSIONS` environment variable to a comma separated list of PHP versions. This defaults to a hard-coded list defined in the `build_packages.sh` file +### Local using Docker +1. Install `docker`. +2. `cd php-docker/package-builder` +3. `docker build -t deb-package-builder .` +4. Create directory for built packages: `mkdir -p ~/gcloud/packages` +5. `docker run --rm -it -v ~/gcloud/packages/:/workspace deb-package-builder:latest` +6. You can pass a comma separated list of PHP versions, followed by a comma separated list of extensions, and optionally + a comma separated list of libraries to build. *see package-builder/build_packages.sh* + ## Adding New Extensions This folder contains a `new_extension.sh` script to generate the skeleton for diff --git a/package-builder/build.sh b/package-builder/build.sh index 2902291d..d2e3e979 100755 --- a/package-builder/build.sh +++ b/package-builder/build.sh @@ -26,8 +26,10 @@ fi export BUILD_DIR export ARTIFACT_DIR='/workspace/pkg' +export ARTIFACT_LOG_DIR='/workspace/log' export ARTIFACT_LIB_DIR="${ARTIFACT_DIR}/libraries" export DEB_BUILDER_DIR='/workspace' +source ${DEB_BUILDER_DIR}/functions.sh mkdir -p ${BUILD_DIR} ${ARTIFACT_LIB_DIR} @@ -41,12 +43,12 @@ PHP_VERSIONS=${1} EXTENSIONS=${2} if [ -z "$EXTENSIONS" ]; then # Explicitly declaring because some extenions depend on others (pq depends on raphf) - EXTENSIONS="amqp,apcu,apcu_bc,apm,bitset,cassandra,couchbase,ds,eio,ev,event,grpc,hprose,imagick,igbinary,jsonc,jsond,krb5,libsodium,lua,lzf,mailparse,memcache,memcached,memprof,mongo,mongodb,oauth,opencensus,phalcon,protobuf,raphf,pq,rdkafka,redis,seaslog,stackdriver_debugger,stomp,suhosin,swoole,sync,tcpwrap,timezonedb,v8js,vips,yaconf,yaf,yaml" + EXTENSIONS="amqp,apcu,apcu_bc,apm,bitset,cassandra,couchbase,ds,eio,ev,event,grpc,hprose,imagick,igbinary,jsonc,jsond,krb5,libsodium,lua,lzf,mailparse,memcache,memcached,memprof,mongo,mongodb,oauth,opencensus,phalcon,protobuf,raphf,pq,rdkafka,redis,seaslog,stackdriver_debugger,stomp,suhosin,swoole,sync,tcpwrap,timezonedb,v8js,vips,xmlrpc,yaconf,yaf,yaml" fi LIBRARIES=${3} if [ -z "$LIBRARIES" ]; then - LIBRARIES="cassandra-cpp-driver,libv8,libvips" + LIBRARIES="cassandra-cpp-driver,libv8,librabbitmq" fi @@ -65,9 +67,9 @@ build_php_version() export PACKAGE_NAME="gcp-php${SHORT_VERSION}" PHP_PACKAGE="gcp-php${SHORT_VERSION}_${FULL_VERSION}_amd64.deb" export ARTIFACT_PKG_DIR="${ARTIFACT_DIR}/${FULL_VERSION}" - if [ "${SHORT_VERSION}" == "72" ]; then - export EXTRA_DEPS="libsodium18, " - export EXTRA_OPTS="--with-sodium" + if [[ "${SHORT_VERSION}" == "74"]] || [["${SHORT_VERSION}" == "80" ]]; then + export EXTRA_DEPS="libicu60, libpng16-16, libreadline7, libreadline-dev" + export EXTRA_OPTS="--with-pear --with-sodium" else export EXTRA_DEPS="" export EXTRA_OPTS="" @@ -92,11 +94,12 @@ build_php_version() curl -sL "${PRE_GA_PACKAGE_BASE_URL}php-${PHP_VERSION}.tar.gz.asc" \ > php-${PHP_VERSION}.tar.gz.asc else - curl -sL "https://php.net/get/php-${PHP_VERSION}.tar.gz/from/this/mirror" \ + curl -sL "https://php.net/distributions/php-${PHP_VERSION}.tar.gz" \ > php-${PHP_VERSION}.tar.gz - curl -sL "https://php.net/get/php-${PHP_VERSION}.tar.gz.asc/from/this/mirror" \ + curl -sL "https://php.net/distributions/php-${PHP_VERSION}.tar.gz.asc" \ > php-${PHP_VERSION}.tar.gz.asc fi + cat ${DEB_BUILDER_DIR}/gpgkeys/php${SHORT_VERSION}/* | gpg --dearmor \ > ${DEB_BUILDER_DIR}/gpgkeys/php${SHORT_VERSION}.gpg gpg --no-default-keyring --keyring \ @@ -174,11 +177,17 @@ for VERSION in $(echo ${PHP_VERSIONS} | tr "," "\n"); do ln -sf /opt/php${SHORT_VERSION} ${PHP_DIR} # build extensions - if [[ "${SHORT_VERSION}" > "72" ]]; then - EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/apm,//g') - EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/cassandra,//g') - EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/v8js,//g') + EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/apm,//g') + EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/cassandra,//g') + EXTENSIONS=$(echo $EXTENSIONS | sed -e 's/v8js,//g') + + + if [[ "${SHORT_VERSION}" == "80" ]]; then + PHP_MAJOR_VERSION=8 + elif [[ "${SHORT_VERSION}" < "80" ]]; then + PHP_MAJOR_VERSION=7 fi + for EXTENSION in $(echo ${EXTENSIONS} | tr "," "\n"); do build_php_extension $EXTENSION done diff --git a/package-builder/build_packages.sh b/package-builder/build_packages.sh index a1d5f4ee..3c3c4474 100755 --- a/package-builder/build_packages.sh +++ b/package-builder/build_packages.sh @@ -21,7 +21,7 @@ if [ -z "${GOOGLE_PROJECT_ID}" ]; then fi if [ -z "${PHP_VERSIONS}" ]; then - PHP_VERSIONS='7.2.4-1,7.1.16-1,7.0.29-1,5.6.35-1' + PHP_VERSIONS='8.0.6-1,7.4.19-1,7.3.28-1' echo "Defaulting PHP Versions to: ${PHP_VERSIONS}" fi diff --git a/package-builder/debian/control.in b/package-builder/debian/control.in index 42ba36ae..95e6e319 100644 --- a/package-builder/debian/control.in +++ b/package-builder/debian/control.in @@ -2,11 +2,11 @@ Source: gcp-php${SHORT_VERSION} Section: unknown Priority: optional Maintainer: Takashi Matsuo -Build-Depends: debhelper (>= 8.0.0), devscripts, build-essential, libparse-debcontrol-perl, libbz2-dev, libcurl-ssl-dev, libgettextpo-dev, libicu-dev, libjpeg-turbo8-dev, libmcrypt-dev, libmemcached-dev, libpcre3-dev, libpng-dev, libpq-dev, libreadline6-dev, librecode-dev, libsasl2-dev, libsqlite3-dev, libssl-dev, libxml2-dev, libxslt1-dev, zlib1g-dev, libfreetype6-dev +Build-Depends: debhelper (>= 8.0.0), devscripts, build-essential, libparse-debcontrol-perl, libbz2-dev, libcurl-ssl-dev, libgettextpo-dev, libicu-dev, libjpeg-turbo8-dev, libmcrypt-dev, libmemcached-dev, libpcre3-dev, libpng-dev, libpq-dev, libreadline-dev, librecode-dev, libsasl2-dev, libsqlite3-dev, libxml2-dev, libxslt1-dev, zlib1g-dev, libfreetype6-dev Standards-Version: 3.9.4 Homepage: http://php.net/ Package: gcp-php${SHORT_VERSION} Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${EXTRA_DEPS}gettext, libbz2-1.0, libfreetype6, libicu55, libjpeg-turbo8-dev, libmcrypt4, libmemcached11, libmemcachedutil2, libpcre3, libpng12-0, libpq5, libreadline6, librecode0, libsasl2-modules, libsqlite3-0, libxml2, libxslt1.1, openssl, zlib1g +Depends: ${shlibs:Depends}, ${misc:Depends}, ${EXTRA_DEPS}gettext, libbz2-1.0, libfreetype6, libjpeg-turbo8-dev, libmcrypt4, libmemcached11, libmemcachedutil2, libpcre3, libpq5, librecode0, libsasl2-modules, libsqlite3-0, libxml2, libxslt1.1, openssl, zlib1g Description: PHP for Google Cloud Platform runtimes diff --git a/package-builder/debian/patches/php80-parse_str_harden.patch b/package-builder/debian/patches/php80-parse_str_harden.patch new file mode 100644 index 00000000..e69de29b diff --git a/package-builder/debian/rules.in b/package-builder/debian/rules.in index 15eee43a..ee0507ae 100755 --- a/package-builder/debian/rules.in +++ b/package-builder/debian/rules.in @@ -2,7 +2,8 @@ # -*- makefile -*- # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 +export VERBOSE=1 %: dh $@ @@ -12,6 +13,7 @@ override_dh_auto_configure: && ./buildconf --force \ && ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ && dh_auto_configure -- --prefix=/opt/php${SHORT_VERSION} ${EXTRA_OPTS} \ + --verbose \ --with-config-file-path=/opt/php${SHORT_VERSION}/lib \ --with-config-file-scan-dir=/opt/php${SHORT_VERSION}/lib/ext.enabled:/opt/php${SHORT_VERSION}/lib/conf.d \ --enable-sysvsem \ @@ -32,31 +34,44 @@ override_dh_auto_configure: --enable-shmop=shared \ --enable-soap=shared \ --enable-sockets \ + --enable-libxml \ --enable-zip \ --with-bz2 \ --with-curl \ --with-gettext=shared \ + --with-external-gd=shared \ --with-gd=shared \ --with-gmp \ + --with-freetype \ --with-freetype-dir=/usr \ + --with-jpeg \ --with-jpeg-dir=/usr \ --with-mcrypt \ --with-pdo_sqlite=shared,/usr \ + --without-pdo-sqlite=shared,/usr \ --with-pdo-pgsql \ + --with-pear \ --with-pgsql \ - --with-sqlite3=shared,/usr \ --with-xmlrpc=shared \ + --with-libxml \ --with-xsl=shared \ --with-fpm-user=www-data \ --with-fpm-group=www-data \ - --with-mysql \ + --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-openssl \ - --with-pcre-regex \ --with-readline \ --with-recode \ - --with-zlib + --with-sodium=/usr \ + --with-png-dir=/usr \ + --with-webp \ + --with-webp-dir=/usr \ + --with-xpm \ + --with-xpm-dir=shared \ + --with-zip \ + --with-zlib \ + --with-zlib-dir=/usr override_dh_auto_test: diff --git a/package-builder/extensions/amqp/build.sh b/package-builder/extensions/amqp/build.sh index 4361dfbc..8be50850 100755 --- a/package-builder/extensions/amqp/build.sh +++ b/package-builder/extensions/amqp/build.sh @@ -2,13 +2,17 @@ set -ex source ${DEB_BUILDER_DIR}/functions.sh +export PHP_LIBRABBITMQ_DIR="no" echo "Building amqp for gcp-php${SHORT_VERSION}" +# Now build the extension PNAME="gcp-php${SHORT_VERSION}-amqp" -apt-get install -y librabbitmq-dev +# Install the packages for librabbitmq +install_last_package "librabbitmq" +install_last_package "librabbitmq-dev" # Download the source -download_from_pecl amqp +download_from_pecl amqp 1.11.0beta build_package amqp diff --git a/package-builder/extensions/amqp/debian/control.in b/package-builder/extensions/amqp/debian/control.in index c8ee0cdb..6e474143 100644 --- a/package-builder/extensions/amqp/debian/control.in +++ b/package-builder/extensions/amqp/debian/control.in @@ -8,5 +8,5 @@ Homepage: https://pecl.php.net/package/amqp Package: gcp-php${SHORT_VERSION}-amqp Architecture: any -Depends: librabbitmq4, libc6 (>= 2.4), gcp-php${SHORT_VERSION} -Description: amqp extension module for gcp-php${SHORT_VERSION} +Depends: librabbitmq (> 0.10.0), libc6 (>= 2.14), gcp-php${SHORT_VERSION} +Description: AMQP extension for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/amqp/debian/rules.in b/package-builder/extensions/amqp/debian/rules.in index 17b239dd..a5ea43c2 100644 --- a/package-builder/extensions/amqp/debian/rules.in +++ b/package-builder/extensions/amqp/debian/rules.in @@ -1,11 +1,10 @@ #!/usr/bin/make -f - %: dh $@ override_dh_auto_configure: phpize && \ - ./configure + ./configure --enable-debug override_dh_auto_test: diff --git a/package-builder/extensions/apcu/build.sh b/package-builder/extensions/apcu/build.sh index 5cb442e1..64610220 100755 --- a/package-builder/extensions/apcu/build.sh +++ b/package-builder/extensions/apcu/build.sh @@ -12,7 +12,7 @@ PNAME="gcp-php${SHORT_VERSION}-apcu" if [ ${SHORT_VERSION} == '56' ]; then download_from_pecl apcu 4.0.11 else - download_from_pecl apcu + download_from_pecl apcu 5.1.20 fi build_package apcu diff --git a/package-builder/extensions/apcu_bc/build.sh b/package-builder/extensions/apcu_bc/build.sh index f6916d8e..3c9769c6 100755 --- a/package-builder/extensions/apcu_bc/build.sh +++ b/package-builder/extensions/apcu_bc/build.sh @@ -9,13 +9,13 @@ echo "Building apcu_bc for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-apcu-bc" # Download the source -if [ ${SHORT_VERSION} == '56' ]; then +if [ ${SHORT_VERSION} == '56' ] || [ ${SHORT_VERSION} == '80' ]; then echo 'No need to build apcu_bc' exit 0 else # We need to install the build dep install_last_package "gcp-php${SHORT_VERSION}-apcu" - download_from_pecl apcu_bc-beta + download_from_pecl apcu_bc 1.0.5 fi cp -R ${DEB_BUILDER_DIR}/extensions/apcu_bc/debian ${PACKAGE_DIR} diff --git a/package-builder/extensions/apm/build.sh b/package-builder/extensions/apm/build.sh index 3d70326b..65e1a9e4 100755 --- a/package-builder/extensions/apm/build.sh +++ b/package-builder/extensions/apm/build.sh @@ -6,7 +6,7 @@ echo "Building apm for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-apm" -if [ ${SHORT_VERSION} == '56' ]; then +if [ ${SHORT_VERSION} == '56' ] || [ ${SHORT_VERSION} == '80' ]; then echo "apm extension only for PHP 7.0+, relies on removed json.h for PHP 5.6" exit 0 fi diff --git a/package-builder/extensions/cassandra/build.sh b/package-builder/extensions/cassandra/build.sh index 1875042e..b22b6a28 100755 --- a/package-builder/extensions/cassandra/build.sh +++ b/package-builder/extensions/cassandra/build.sh @@ -11,7 +11,24 @@ PNAME="gcp-php${SHORT_VERSION}-cassandra" install_last_package "cassandra-cpp-driver" install_last_package "cassandra-cpp-driver-dev" +LINK="/usr/lib/x86_64-linux-gnu/libcassandra.so" +# Temporary fix for broken symlink +if [ -L ${LINK} ]; then + ls -al ${LINK} + echo "Removing link.." + rm ${LINK} +fi + +ln -s /usr/lib/x86_64-linux-gnu/libcassandra.so.2.16.0 ${LINK} +ls -al /usr/lib/x86_64-linux-gnu/libcass* + # Download the source -download_from_pecl cassandra +#download_from_pecl cassandra +git clone https://github.com/nano-interactive/php-driver.git +pushd php-driver +PACKAGE_DIR=`pwd`/ext +EXT_VERSION=1.31.1 build_package cassandra +popd +rm -rf php-driver \ No newline at end of file diff --git a/package-builder/extensions/couchbase/build.sh b/package-builder/extensions/couchbase/build.sh index 832494d1..579204fc 100755 --- a/package-builder/extensions/couchbase/build.sh +++ b/package-builder/extensions/couchbase/build.sh @@ -11,9 +11,11 @@ if [ ${SHORT_VERSION} == '56' ]; then exit 0 fi -curl http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-3-amd64.deb -o couchbase-release-1.0-3-amd64.deb -dpkg -i couchbase-release-1.0-3-amd64.deb +curl http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-amd64.deb -o couchbase-release-1.0-amd64.deb +dpkg -i couchbase-release-1.0-amd64.deb +curl -L https://packages.couchbase.com/clients/c/repos/deb/couchbase.key | apt-key add - +echo "deb https://packages.couchbase.com/clients/c/repos/deb/ubuntu1604 xenial xenial/main" | tee -a /etc/apt/sources.list apt-get update apt-get install -y libcouchbase-dev @@ -22,8 +24,8 @@ download_from_pecl couchbase build_package couchbase -# download libcouchbase2-core (runtime dependency) -for PKG in `apt-get download --print-uris -qq libcouchbase2-core | cut -d"'" -f2`; do +# download libcouchbase3 (runtime dependency) +for PKG in `apt-get download --print-uris -qq libcouchbase3 | cut -d"'" -f2`; do if [ ! -f "${ARTIFACT_PKG_DIR}/$(basename $PKG)" ]; then curl -o ${ARTIFACT_PKG_DIR}/$(basename $PKG) $PKG fi diff --git a/package-builder/extensions/couchbase/debian/control.in b/package-builder/extensions/couchbase/debian/control.in index fac96c78..2c3269fe 100644 --- a/package-builder/extensions/couchbase/debian/control.in +++ b/package-builder/extensions/couchbase/debian/control.in @@ -8,5 +8,5 @@ Homepage: https://pecl.php.net/package/couchbase Package: gcp-php${SHORT_VERSION}-couchbase Architecture: any -Depends: libcouchbase2-core, libc6 (>= 2.4), gcp-php${SHORT_VERSION} +Depends: libcouchbase3, libc6 (>= 2.4), gcp-php${SHORT_VERSION} Description: couchbase extension module for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/couchbase/debian/copyright b/package-builder/extensions/couchbase/debian/copyright index 7c6a6054..8cf4c814 100644 --- a/package-builder/extensions/couchbase/debian/copyright +++ b/package-builder/extensions/couchbase/debian/copyright @@ -4,7 +4,7 @@ Upstream-Contact: Sergey Avseyev Source: https://pecl.php.net/package/couchbase Files: * -Copyright: 2016-2017 Couchbase Inc. +Copyright: 2016-2021 Couchbase Inc. License: Apache-2.0 Files: debian/* diff --git a/package-builder/extensions/eio/build.sh b/package-builder/extensions/eio/build.sh index 84e568dc..ee067307 100755 --- a/package-builder/extensions/eio/build.sh +++ b/package-builder/extensions/eio/build.sh @@ -9,6 +9,7 @@ PNAME="gcp-php${SHORT_VERSION}-eio" apt-get install -y libeio-dev # Download the source -download_from_pecl eio +#download_from_pecl eio +download_from_pecl eio 3.0.0RC2 build_package eio diff --git a/package-builder/extensions/event/debian/control.in b/package-builder/extensions/event/debian/control.in index 36fb3b93..761fa0e0 100644 --- a/package-builder/extensions/event/debian/control.in +++ b/package-builder/extensions/event/debian/control.in @@ -8,5 +8,5 @@ Homepage: http://pecl.php.net/package/event Package: gcp-php${SHORT_VERSION}-event Architecture: any -Depends: libevent-2.0-5, libevent-openssl-2.0-5, libevent-extra-2.0-5, gcp-php${SHORT_VERSION} +Depends: libevent-2.1-6, libevent-openssl-2.1-6, libevent-extra-2.1-6, gcp-php${SHORT_VERSION} Description: event extension module for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/hprose/build.sh b/package-builder/extensions/hprose/build.sh index 45c4a22d..45b0853c 100755 --- a/package-builder/extensions/hprose/build.sh +++ b/package-builder/extensions/hprose/build.sh @@ -7,6 +7,12 @@ echo "Building hprose for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-hprose" # Download the source -download_from_pecl hprose +if [ ${SHORT_VERSION} == '80' ]; then + echo 'Hprose is not supported in php8' + exit 0 +else + # Download the source + download_from_pecl hprose -build_package hprose + build_package hprose +fi diff --git a/package-builder/extensions/imagick/build.sh b/package-builder/extensions/imagick/build.sh index b120e7bf..8ec4b381 100755 --- a/package-builder/extensions/imagick/build.sh +++ b/package-builder/extensions/imagick/build.sh @@ -7,8 +7,12 @@ source ${DEB_BUILDER_DIR}/functions.sh echo "Building imagick for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-imagick" +apt-get install -y fonts-urw-base35 || true +apt-get install -y libfreetype6-dev || true +apt-get install -y texlive-fonts-recommended || true # Download the source -download_from_pecl imagick +#download_from_pecl imagick +download_from_git https://github.com/Imagick/imagick 7.0.10-27 build_package imagick diff --git a/package-builder/extensions/jsond/build.sh b/package-builder/extensions/jsond/build.sh index 3ccfb0a3..2dfc8fe9 100755 --- a/package-builder/extensions/jsond/build.sh +++ b/package-builder/extensions/jsond/build.sh @@ -7,6 +7,12 @@ echo "Building jsond for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-jsond" # Download the source -download_from_pecl jsond +if [ ${SHORT_VERSION} == '80' ]; then + echo 'Json support is included in php8' + exit 0 +else + # Download the source + download_from_pecl jsond -build_package jsond + build_package jsond +fi diff --git a/package-builder/extensions/libsodium/build.sh b/package-builder/extensions/libsodium/build.sh index ba7d97de..2b62a67d 100755 --- a/package-builder/extensions/libsodium/build.sh +++ b/package-builder/extensions/libsodium/build.sh @@ -9,11 +9,11 @@ PNAME="gcp-php${SHORT_VERSION}-libsodium" # Download the source if [ ${SHORT_VERSION} == '56' ]; then download_from_pecl libsodium 1.0.7 -elif [ ${SHORT_VERSION} == '72' ]; then - echo "no need for building libsodium for gcp-php${SHORT_VERSION}" +elif [ ${SHORT_VERSION} == '73' ] || [ ${SHORT_VERSION} == '74' ] || [ ${SHORT_VERSION} == '80' ]; then + echo "Sodium already builtin for gcp-php${SHORT_VERSION}" exit 0 else - download_from_pecl libsodium 2.0.12 + download_from_pecl libsodium 2.0.23 fi build_package libsodium diff --git a/package-builder/extensions/libsodium/debian/control.in b/package-builder/extensions/libsodium/debian/control.in index b5a2c44f..d767718f 100644 --- a/package-builder/extensions/libsodium/debian/control.in +++ b/package-builder/extensions/libsodium/debian/control.in @@ -8,5 +8,5 @@ Homepage: https://pecl.php.net/package/libsodium Package: gcp-php${SHORT_VERSION}-libsodium Architecture: any -Depends: libsodium18, libc6 (>= 2.4), gcp-php${SHORT_VERSION} +Depends: libsodium23, libc6 (>= 2.4), gcp-php${SHORT_VERSION} Description: libsodium extension module for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/lua/build.sh b/package-builder/extensions/lua/build.sh index 1df3178c..acea7ee9 100755 --- a/package-builder/extensions/lua/build.sh +++ b/package-builder/extensions/lua/build.sh @@ -9,6 +9,9 @@ PNAME="gcp-php${SHORT_VERSION}-lua" if [ ${SHORT_VERSION} == '56' ]; then echo "lua extension only for PHP 7.0+" exit 0 +elif [ ${SHORT_VERSION} == '80' ]; then + echo "lua extension is not supported in PHP 8.0 yet" + exit 0 fi ln -sf /usr/include/lua5.3 /usr/include/lua diff --git a/package-builder/extensions/mongodb/build.sh b/package-builder/extensions/mongodb/build.sh index e483d8bb..07afd06a 100755 --- a/package-builder/extensions/mongodb/build.sh +++ b/package-builder/extensions/mongodb/build.sh @@ -9,6 +9,6 @@ echo "Building mongodb for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-mongodb" # Download the source -download_from_pecl mongodb +download_from_pecl mongodb 1.9.1 build_package mongodb diff --git a/package-builder/extensions/opencensus/build.sh b/package-builder/extensions/opencensus/build.sh index 16245ffa..435ac7bd 100755 --- a/package-builder/extensions/opencensus/build.sh +++ b/package-builder/extensions/opencensus/build.sh @@ -6,11 +6,21 @@ echo "Building opencensus for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-opencensus" -if [ ${SHORT_VERSION} == '56' ]; then - echo "opencensus doesn't support PHP 5.6" +if [[ ${SHORT_VERSION} == '56' ]]; then + echo "opencensus does not support PHP $SHORT_VERSION" exit 0 else - download_from_pecl opencensus-alpha -fi + # download_from_tarball https://github.com/census-instrumentation/opencensus-php/archive/v0.6.0.tar.gz 0.6.0 + git clone https://github.com/Timing-GmbH/opencensus-php.git + + pushd opencensus-php + git checkout -t origin/php8-compat + + PACKAGE_DIR=`pwd`/ext + EXT_VERSION=2.1.2 -build_package opencensus + build_package opencensus + popd + + rm -rf opencensus-php +fi diff --git a/package-builder/extensions/opencensus/debian/rules b/package-builder/extensions/opencensus/debian/rules new file mode 100644 index 00000000..d58909b9 --- /dev/null +++ b/package-builder/extensions/opencensus/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + phpize && \ + ./configure --enable-opencensus + +override_dh_auto_test: + +override_dh_auto_install: + INSTALL_ROOT=$(CURDIR)/debian/gcp-php${SHORT_VERSION}-opencensus \ + dh_auto_install diff --git a/package-builder/extensions/phalcon/build.sh b/package-builder/extensions/phalcon/build.sh index aa40ba97..31450c77 100755 --- a/package-builder/extensions/phalcon/build.sh +++ b/package-builder/extensions/phalcon/build.sh @@ -29,6 +29,10 @@ elif [ ${SHORT_VERSION} == "72" ]; then download_from_tarball https://github.com/phalcon/cphalcon/archive/v3.4.2.tar.gz 3.4.2 # No json as it's inside php from php 7 PACKAGE_DIR=${PACKAGE_DIR}/build/php7/64bits/ +elif [ ${SHORT_VERSION} == '73' ] || [ ${SHORT_VERSION} == '74' ]; then + download_from_tarball https://github.com/phalcon/cphalcon/archive/v4.1.2.tar.gz 4.1.2 + # No json as it's inside php from php 7 + PACKAGE_DIR=${PACKAGE_DIR}/build/php7/64bits/ else echo "skipping Phalcon for gcp-php${SHORT_VERSION} - not yet supported" exit 0 diff --git a/package-builder/extensions/pq/build.sh b/package-builder/extensions/pq/build.sh index 7f7acbfa..5376010d 100755 --- a/package-builder/extensions/pq/build.sh +++ b/package-builder/extensions/pq/build.sh @@ -17,7 +17,7 @@ PNAME="gcp-php${SHORT_VERSION}-pq" if [ ${SHORT_VERSION} == "56" ]; then download_from_pecl pq 1.1.1 else - download_from_pecl pq + download_from_git https://github.com/m6w6/ext-pq.git 2.1.9 fi build_package pq diff --git a/package-builder/extensions/raphf/build.sh b/package-builder/extensions/raphf/build.sh index 441ae56e..46d28a0a 100755 --- a/package-builder/extensions/raphf/build.sh +++ b/package-builder/extensions/raphf/build.sh @@ -13,7 +13,7 @@ PNAME="gcp-php${SHORT_VERSION}-raphf" if [ ${SHORT_VERSION} == "56" ]; then download_from_pecl raphf 1.1.2 else - download_from_pecl raphf + download_from_git https://github.com/m6w6/ext-raphf.git 2.0.2 fi build_package raphf diff --git a/package-builder/extensions/redis/build.sh b/package-builder/extensions/redis/build.sh index 0d79ad45..28d00f50 100755 --- a/package-builder/extensions/redis/build.sh +++ b/package-builder/extensions/redis/build.sh @@ -9,6 +9,6 @@ echo "Building redis for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-redis" # Download the source -download_from_pecl redis 3.1.6 +download_from_pecl redis 5.3.4 build_package redis diff --git a/package-builder/extensions/skeleton/build.sh b/package-builder/extensions/skeleton/build.sh old mode 100644 new mode 100755 diff --git a/package-builder/extensions/stackdriver_debugger/build.sh b/package-builder/extensions/stackdriver_debugger/build.sh index 6720a497..8ce27603 100755 --- a/package-builder/extensions/stackdriver_debugger/build.sh +++ b/package-builder/extensions/stackdriver_debugger/build.sh @@ -9,8 +9,13 @@ PNAME="gcp-php${SHORT_VERSION}-stackdriver-debugger" if [ ${SHORT_VERSION} == '56' ]; then echo "PHP 5.6 is not supported" exit 0 +elif [ ${SHORT_VERSION} == '80' ]; then + # download_from_git https://github.com/frost-byte/stackdriver-debugger-php-extension.git 0.3.0 + echo "PHP 8.0 is not supported" + exit 0 fi -download_from_pecl stackdriver_debugger-alpha +download_from_git https://github.com/GoogleCloudPlatform/stackdriver-debugger-php-extension.git 0.2.0 +# download_from_pecl stackdriver_debugger build_package stackdriver_debugger diff --git a/package-builder/extensions/stomp/build.sh b/package-builder/extensions/stomp/build.sh index 2da0dbfa..a5696c78 100755 --- a/package-builder/extensions/stomp/build.sh +++ b/package-builder/extensions/stomp/build.sh @@ -9,6 +9,8 @@ PNAME="gcp-php${SHORT_VERSION}-stomp" # Download the source if [ ${SHORT_VERSION} == '56' ]; then download_from_pecl stomp 1.0.9 +elif [ ${SHORT_VERSION} == '80' ]; then + download_from_git https://github.com/php/pecl-tools-stomp.git 3.0 else download_from_pecl stomp fi diff --git a/package-builder/extensions/tcpwrap/build.sh b/package-builder/extensions/tcpwrap/build.sh index cab426a7..4fb19a17 100755 --- a/package-builder/extensions/tcpwrap/build.sh +++ b/package-builder/extensions/tcpwrap/build.sh @@ -6,6 +6,11 @@ echo "Building tcpwrap for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-tcpwrap" +if [ ${SHORT_VERSION} == '80' ]; then + echo "tcpwrap is not supported by PHP 8.0 yet" + exit 0 +fi + apt-get install -y gawk libwrap0-dev # Download the source diff --git a/package-builder/extensions/timezonedb/build.sh b/package-builder/extensions/timezonedb/build.sh index c64df1e6..1e205dae 100755 --- a/package-builder/extensions/timezonedb/build.sh +++ b/package-builder/extensions/timezonedb/build.sh @@ -7,6 +7,6 @@ echo "Building timezonedb for gcp-php${SHORT_VERSION}" PNAME="gcp-php${SHORT_VERSION}-timezonedb" # Download the source -download_from_pecl timezonedb 2019.3 +download_from_pecl timezonedb 2021.1 build_package timezonedb diff --git a/package-builder/extensions/v8js/build.sh b/package-builder/extensions/v8js/build.sh index bf7edf8f..f44c492d 100755 --- a/package-builder/extensions/v8js/build.sh +++ b/package-builder/extensions/v8js/build.sh @@ -13,7 +13,11 @@ fi install_last_package "libv8" +ls -al /opt/v8/lib +cp -R /opt/v8/ /usr +echo "LibDir: $PHP_LIBDIR" # Download the source -download_from_pecl v8js 2.1.0 +#download_from_pecl v8js 2.1.2 +download_from_git https://github.com/phpv8/v8js.git 2.1.2 build_package v8js diff --git a/package-builder/extensions/v8js/debian/rules.in b/package-builder/extensions/v8js/debian/rules.in index 85329307..28bc9fce 100644 --- a/package-builder/extensions/v8js/debian/rules.in +++ b/package-builder/extensions/v8js/debian/rules.in @@ -5,7 +5,7 @@ override_dh_auto_configure: phpize && \ - ./configure --with-v8js=/opt/v8 + PHP_LIBDIR=/opt/v8 ./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS" override_dh_auto_test: diff --git a/package-builder/extensions/vips/build.sh b/package-builder/extensions/vips/build.sh index da182d3e..42b04c78 100755 --- a/package-builder/extensions/vips/build.sh +++ b/package-builder/extensions/vips/build.sh @@ -11,10 +11,7 @@ if [ ${SHORT_VERSION} == '56' ]; then exit 0 fi -apt-get install -y libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev - -install_last_package libvips -install_last_package libvips-dev +apt-get install -y libvips42 libvips-dev # Download the source download_from_pecl vips diff --git a/package-builder/extensions/vips/debian/control.in b/package-builder/extensions/vips/debian/control.in index 3f601607..29124eae 100644 --- a/package-builder/extensions/vips/debian/control.in +++ b/package-builder/extensions/vips/debian/control.in @@ -8,5 +8,5 @@ Homepage: https://pecl.php.net/package/vips Package: gcp-php${SHORT_VERSION}-vips Architecture: any -Depends: libvips, libc6 (>= 2.4), gcp-php${SHORT_VERSION} +Depends: libvips42, libc6 (>= 2.4), gcp-php${SHORT_VERSION} Description: vips extension module for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/xmlrpc/build.sh b/package-builder/extensions/xmlrpc/build.sh new file mode 100755 index 00000000..ed888ddc --- /dev/null +++ b/package-builder/extensions/xmlrpc/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -ex +source ${DEB_BUILDER_DIR}/functions.sh + +echo "Building xmlrpc for gcp-php${SHORT_VERSION}" + +PNAME="gcp-php${SHORT_VERSION}-xmlrpc" + +if [ ${SHORT_VERSION} == '80' ]; then + # Download the source + download_from_pecl xmlrpc 1.0.0RC2 + + build_package xmlrpc +else + echo 'xmlrpc is builtin already' + exit 0 +fi diff --git a/package-builder/extensions/xmlrpc/debian/compat b/package-builder/extensions/xmlrpc/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/compat @@ -0,0 +1 @@ +9 diff --git a/package-builder/extensions/xmlrpc/debian/control.in b/package-builder/extensions/xmlrpc/debian/control.in new file mode 100644 index 00000000..0ca1b836 --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/control.in @@ -0,0 +1,12 @@ +Source: gcp-php${SHORT_VERSION}-xmlrpc +Section: php +Priority: optional +Maintainer: Brian D. Bradshaw +Build-Depends: debhelper (>= 9), gcp-php${SHORT_VERSION} +Standards-Version: 3.9.5 +Homepage: https://pecl.php.net/package/xmlrpc + +Package: gcp-php${SHORT_VERSION}-xmlrpc +Architecture: any +Depends: libc6 (>= 2.4), gcp-php${SHORT_VERSION} +Description: xmlrpc extension module for gcp-php${SHORT_VERSION} diff --git a/package-builder/extensions/xmlrpc/debian/copyright b/package-builder/extensions/xmlrpc/debian/copyright new file mode 100644 index 00000000..85406a03 --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/copyright @@ -0,0 +1,72 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: xmlrpc +Upstream-Contact: Christoph M. Becker +Source: https://pecl.php.net/package/xmlrpc + +Files: * +Copyright: 1999-2014, The PHP Group +License: PHP-3.0.1 + This software is subject to version 3.01 of the PHP + license, as shown below. + . + -------------------------------------------------------------------- + The PHP License, version 3.01 + Copyright (c) 1999 - 2010 The PHP Group. All rights reserved. + -------------------------------------------------------------------- + . + Redistribution and use in source and binary forms, with or without + modification, is permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + . + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact group@php.net. + . + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from group@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + . + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + . + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP software, freely available from + ". + . + THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND + ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP + DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + . + -------------------------------------------------------------------- + +Files: debian/* +Copyright: 2017 Google, Inc. +License: Apache-2.0 diff --git a/package-builder/extensions/xmlrpc/debian/ext-xmlrpc.ini b/package-builder/extensions/xmlrpc/debian/ext-xmlrpc.ini new file mode 100644 index 00000000..b03d93cf --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/ext-xmlrpc.ini @@ -0,0 +1 @@ +extension=xmlrpc.so diff --git a/package-builder/extensions/xmlrpc/debian/gcp-php-xmlrpc.install.in b/package-builder/extensions/xmlrpc/debian/gcp-php-xmlrpc.install.in new file mode 100644 index 00000000..ed27f964 --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/gcp-php-xmlrpc.install.in @@ -0,0 +1 @@ +debian/ext-xmlrpc.ini opt/php${SHORT_VERSION}/lib/ext.available diff --git a/package-builder/extensions/xmlrpc/debian/rules.in b/package-builder/extensions/xmlrpc/debian/rules.in new file mode 100644 index 00000000..c97f1dbf --- /dev/null +++ b/package-builder/extensions/xmlrpc/debian/rules.in @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + phpize && \ + ./configure + +override_dh_auto_test: + +override_dh_auto_install: + INSTALL_ROOT=$(CURDIR)/debian/gcp-php${SHORT_VERSION}-xmlrpc \ + dh_auto_install diff --git a/package-builder/functions.sh b/package-builder/functions.sh index cfb6bb91..364f8b6b 100644 --- a/package-builder/functions.sh +++ b/package-builder/functions.sh @@ -39,9 +39,11 @@ download_from_pecl() # chop off optional -beta from the package name. it is needed to specify # we are downloading a beta version, but is not actually part of the # package name + # Also remove any release candidate suffix PACKAGE_SHORT_NAME=$(basename ${PECL_PACKAGE_NAME} -beta) PACKAGE_SHORT_NAME=$(basename ${PACKAGE_SHORT_NAME} -alpha) PACKAGE_SHORT_NAME=$(basename ${PACKAGE_SHORT_NAME} -devel) + PACKAGE_SHORT_NAME=$(echo ${PACKAGE_SHORT_NAME} | sed -E "s/(.*)RC[0-9]$/\1/") if [ -z "$2" ]; then with_retry "pecl download ${PECL_PACKAGE_NAME}" 6 @@ -63,6 +65,32 @@ download_from_pecl() -C ${PACKAGE_DIR} --strip-components=1 } +download_from_git() +{ + # Clone the source code and build debian package + # TODO: specify branch and commit sha? + # Usage: + # download_from_git https://github.com/phalcon/cphalcon.git 3.0.4 + if [ -z "$1" ]; then + echo 'missing argument for download_from_git' + exit $E_PARAM_ERR + fi + if [ -z "$2" ]; then + echo 'missing argument for download_from_git' + exit $E_PARAM_ERR + fi + + EXT_VERSION=$2 + PACKAGE_VERSION="${EXT_VERSION}-${PHP_VERSION}" + PACKAGE_FULL_VERSION="${EXT_VERSION}-${FULL_VERSION}" + PACKAGE_DIR=${PNAME}-${PACKAGE_VERSION} + + # Download the file + mkdir -p ${PACKAGE_DIR} + + with_retry "git clone $1 ${PACKAGE_DIR}" 6 +} + download_from_tarball() { # Download the source code, rename, extract it for debian package @@ -78,12 +106,24 @@ download_from_tarball() fi EXT_VERSION=$2 - PACKAGE_VERSION="${EXT_VERSION}-${PHP_VERSION}" - PACKAGE_FULL_VERSION="${EXT_VERSION}-${FULL_VERSION}" + + if [ -z "$PHP_VERSION" ]; then + PACKAGE_VERSION="${EXT_VERSION}" + else + PACKAGE_VERSION="${EXT_VERSION}-${PHP_VERSION}" + fi + + if [ -z "$FULL_VERSION" ]; then + PACKAGE_FULL_VERSION="${EXT_VERSION}" + else + PACKAGE_FULL_VERSION="${EXT_VERSION}-${FULL_VERSION}" + fi + PACKAGE_DIR=${PNAME}-${PACKAGE_VERSION} # Download the file with_retry "curl -L $1 -o ${PNAME}-${PACKAGE_VERSION}.orig.tar.gz" 6 + pwd mkdir -p ${PACKAGE_DIR} tar zxf ${PNAME}-${PACKAGE_VERSION}.orig.tar.gz \ -C ${PACKAGE_DIR} --strip-components=1 diff --git a/package-builder/gpgkeys/php80/gcaruso.key b/package-builder/gpgkeys/php80/gcaruso.key new file mode 100644 index 00000000..08ecd9ad --- /dev/null +++ b/package-builder/gpgkeys/php80/gcaruso.key @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF629C4BEADl/O47tHfZap6Y3PwfI9/4we/TDwJLqBP8jMz3AH8s5e8rWHII +wXJao1NWFkd4VnSSiNEMeffkrNWpyCbjr06NEmmp49GCUpQwhT1DuQu8LhKoePhI +GnAIstty1LbpylSfTEO7fk7SnkYoyPOCiufEXDOLpBx8Gwm/cMNZhFI05XCQSf5+ +9IjaExihgmdfCKchbyvGrUn9Y7eu5PYUtsEu1STasNzq5usSQ6hot3zBbVoPRK8a +7TZCDGJqzvqH0bIpVHKVKxA8r9kPxTb4jlRPQV81VSe88TgsIzDSeGqOhM5NDTmV +N+qr9AYPAdyFjemsVjMFEL34dEgM2VBsX87q2hvOkY9c9tTycCcUAEyEYREX5tdf +BAFccD/8c9DcK69OOB8dFovJl+qotAeXda39PFQFKCfwYa+y326Y24tM+Jr8GYfs +nUa6MA6H3/oNCAGps0VZnBVRcjnSzNojPc9dA7OnT74ukFb0zGX6xN5dTCKRW/mL +jnlOQEBW5dLKNh2lj9UzG/9KUI4V4fVsEjn8IxtUMhIm7OAsUjGydk8D2CzaPUEG +ZwXTzDwVH2tCZGocPjZ87R4xDbB27K/4nNWb4ux7mlEwis5taBnoiKiAV7R/Fq0L +EJQFoiXRL7tmJCgMo8VDg/a3i+GvDWxr3tTHjQtU+KJ1+Tqif3QrJ53dfQARAQAB +tDhHYWJyaWVsIENhcnVzbyAoUmVsZWFzZSBNYW5hZ2VyKSA8Y2FydXNvZ2Ficmll +bEBwaHAubmV0PokCVAQTAQgAPhYhBL/d0oZCgk+BGO93kJtnpcEiKRGPBQJetvQu +AhsDBQkHhM4ABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEJtnpcEiKRGPd2EQ +AKK3pPDXSMZHoAwV0q1VUdMANxbE+7TE9uXFQx6VdDZxlaEWEUFuua41u8zwCh3v +6F5OjDrlWwoPRq/c5yWvypUB7ItB7L/uvsOqy6V8PGkH4pHxYCyFThC2OvzKFXGq +NrxF70NIAz6NySlQPlu5TK2PrC1MiXMMPciNdfNagSUZQKecMMij4qjRMRypcUZJ +TEker4CR6HC+4UlnBj6UpijKquaGZMAe95oRJLVwCOshLgHjihMe12qwX1njeAQq +PQR4KZ7JUeaY4M1oymxyuZPlwUtAKSouHQ7s7g3KHaoSIalIaxY9OCxs52H5y2uy +FbrqSDVWPh1/zgXffmu6hB/oReyDhhcH47+cTgn23cw86d7+Buppbs05g8QcjbWv +099IRbVpirKmORT+4qdXjev/w74WZUFXKW7PFhHor6PAUb2zAcurVv4RTIVsRD6w +PovUKgkbdJeX9vbJrZycgnGT4twL7WSPKivn4BYBIp28/jZzl2OtiSyZf/hrnEqF +p8fa4DiW9mRA3ExbjfCQqOGMTwLwAkj4m+AhdN55xYQLsj/6pz3AysBRoS1E/vtx +SIpRAAmf3UhhMpRkKk0mA5f4MsQqR7JZ2ben9k/GTHeH7qsqzb1k+rEwEY8F91Qg +sBzT5zO4pPQ1rIGTN4CBa7QcJH3fc3i9rYMYAtuVlpCUuQINBF629C4BEADdWtCy +2yfnyjSBasMbIzTOV+WHcj0DJJDNJjGcy4GTM98gklBcP2W3w+makX6cboHpN/TN +pfAUQPHlqNE4hQKth3Q/clwX6olnNQxS9GZFYCbUjPHMxOCF9RDjewUcIp9AZDgo +Z/jxNCVinb648qOm2ffeWBcjZANxpVMUsqAIWorzxX60qCgVEl0omQZPSs3a0uZO ++mZYRO91Xo9UuVws/krKo+l+vN4g6k1pZF2lCfBAJ8L/m/Ncz5p438ZwFmMWvx4v +rxlsQ4A4T+BJflyUi43BAeSVrdGtVJEil4oM+y5GIm9bNPdZiJEz7DZrbIeXNqKR +jKFiXcG2b8qoDN1aq5QiJC3Rok4ar4YfOZCpL4INQYnINHdNL5lpcyeDBYZG7dKU +y2O4afnvjxd4FnsvYp5qm4s+dl2oPD0Gr+6KTotX2/eVr4vwZDGer+Z5o8c0BHvh +2heFI2RtXxcFadx7LNldg709kAM8/yVdQI9GjRaN+1QFXmyqpHa8TQkUEIOKet9J +MBCJkcCU2GPLVTVJVUD23VcJGCb3YV47FVwKT6MQYVNtEuanr8TIiP9hYRBx4JuT +5qJEml4g4CCOxpuLFIKAK3rJbzpsnaUHhikjlOYGdTELb3wb3XEEH1dZJZwk7WED +Ff+pTVFxMfS5V82kN/wIdCwtF0lfvAfc8/wNBQARAQABiQI8BBgBCAAmFiEEv93S +hkKCT4EY73eQm2elwSIpEY8FAl629C4CGwwFCQeEzgAACgkQm2elwSIpEY9frw// +SgPRLx3Tzcg5PI1P3VLz2Cqi3EEygNHAaQ3L/fjdG31RYowbcPB6coPtt0NF8Sbs +KYC+ze9hy8Qic66XyMrnHOY/fflq4dcK26ncp5CifYTNuJTIY9mR2j+NqDegLeLp +yxRofNGvmJCRY08YfYzkb7Y16UI86vo/vIrEOYu9ck/Vk83rCQYbayzFUK4DjQ+R +OgEvyLlBIzh7dyDbhthxSadI0bXZQU/WSwfs6EySCDAEVKmRmU4Bfq3oVSLE13ne +33VonTCvRijfUlPnAVmd73G9+5Q6YfGwpkW/2hpW8uYQVMuisK0lxf1elbMqlonH +F87ffQ6tAX7khPlQimIx06MsOI/YJ5a2XR9jTMMlIInCm3PBi28Rkurc2K0stjA/ +gSC0A/nJ6RoAMg9pG3BJuoIRli004tdXKLXK9Llwi4j2cFhtvMnIcfR8V77zVDQK +7w0pj9urmaqP1mRWLpGmhS5bUKHCOTxAJMdiuDfsW9MuR7f/DPlzTv7f6QEfsh1j +VKWVIG2dHbo5uYT3VQPVOdXMhzArnDpdLDdPqDtuq3u3tGU5yJoxehwc4DeS4Q5n +HKE+K6ThSaq1u+4TjIbyFJIOZ+Enet8GwfPASrD1xepkVBD3B7r8C6+YwBPEElur +C4aYQG4eexl3RbbnRGir0GxlvcmpWMLo+2IqeVyRrbY= +=PxRL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/package-builder/gpgkeys/php80/sgolemon.key b/package-builder/gpgkeys/php80/sgolemon.key new file mode 100644 index 00000000..a11b7e31 --- /dev/null +++ b/package-builder/gpgkeys/php80/sgolemon.key @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFjxRtoBEADkS6+Q7afwYDPFnqJXuyF2ZIvXysDBrpr/xbre4jVeiC/HIELa +QedOJqO1V+BgnTRkfhor+Yq3mZ1un+6zJIiFcm5Kp7sPZjh15JF96PsA4e2Eh5eC +eJzjXHj1nAKXfn5+CgpYEyL30r1/ACkmo9TKIiUxIDZRkZvxjY4UKeo+EoJo0Viu +tV8mvSTgxaz9gzPhZ5OJR8zECT8j3T8d+tBD8wWxxmGZ0veOu/MBew1C/BDr8RqT +CXDywUbyNuSsdb3a5aLuIuLekSJVSCcFwPIje1WrX4FyC42+elOp0SXpjWzdb08N +XX4DEY8zVyVXI1ScSpTbslffcFkY60NJhjpP7t856L9vTLRfHIM9BIdSYH/ar5mE +Q0vyJbiNfkx5tIMnEmnIYbmnjjmcPZDKZ4PyQEUEWF3DqNOOAWhk9HUMFEkANkd1 +vEcNNQxgD2eOJM6egfUv9KtuAEcRX2iDu3gIyE+55x92VVoEJDu5M+Q6PYGUIMh7 +nz2gS3lnlpG2vquQpqDS9UogsZ8L4NsukdP2ixRFnD9qaTOemqRYwIptOX6wvrtR +7PmWOnnRZ5OcpK5/qyK9iCLY7bbHDViBoV0uLEHNPTDHjrALJrqS+dH1glYid/82 +OvKE3KREjRpMOW83nNfQcqkMi9fhH8WUkz6OD6JemvB/s/CwBS2w3+9LAQARAQAB +tB5TYXJhIEdvbGVtb24gPHBvbGxpdGFAcGhwLm5ldD6JAj4EEwECACgCGwMGCwkI +BwMCBhUIAgkKCwQWAgMBAh4BAheABQJY/TOeBQkNNFUtAAoJENvbOXRw0SFy1xYP +/jQeNv4WUPK3M0Hl3EvEnOeODxePysU0khvgnw/mRtQu7BOwRdbB0HWv8Kx0HXL7 +XI4l2myHRZbd9PrBlG4YFYjZqWmqQ9WGlLBxDpSJNeROpTgKjhxA2hOl1xH2Et5k +bRcZzpJJ9zuD3rqkq80S3u/UAB/QzYfJWKnQBTXi/3psZNAVTRp3/4sEn1kCfEnl +NUYPih/NqdXE0frlKeITOAmatD2cjYcJlc/ETLil8Sq1nIgiE/++KZalbcXcRSHV +ZSd/L+fNlMDIh6k9pjcE562oiyyMHKed/pAX7o1BqlKqSwxjQoNskpICVFkyMv+P +7cIPyOxJa8kaGyyHND+8i1GzvwcPhLYeOWDwmiXBs4Ea8Z7KWxhi19zlxMrEfAcf +FIomcRoxfzcnSY3FVJYIoEySK/IBiivqeunyeDA2JG1vLSZIV5hNicUihp4hnhX4 +Z1gElN+C68P49SZseFzxvzwMq5RIUbWVwIh2+Wj51/UrULgoM4qNkgejDLYFyTxb +LfXq+Tk91UXdpepBHvE9KFVqh4MbIlyx9TAzOizqLdZlnPRwLb3rWBLsv7XbCTeY +tp4jVU8Q35hnvGFy+GsSROJv04mJW+whyz+zxOEMPiVbVA5um3ZbSj5oou87M9Li +JtrUOqNfyyqddLC8L5LgwwlYKqP+W6Q4LMf/Whoj3FFCuQINBFjxRtoBEACk8wfJ +qP03Hz6PX8br3jEUllSngdD/28K2C4RVOOr71u4FJRcEMR98SbPnCNIUt4KdedO1 +DJpYac1XvIaVBbLxEcBjRMWNhBgZbxoQzPjFTWHQ/UwHZPiiwQkL55fN1ejBEacD +V8B1JwqjcBbii6zItLUV/gxGH7Jce/f7KBM7vWlaP+xHpmd+iPK1swK5wNQzDL83 +b7NPyj58fqlmh54Fr+jcpuUjynaYfjtJsgwc4CScdai7FclctLMg8Y8DW7/bkqf1 +BQy9Dik82IWSN4wgVM1eWSGx+PzPlshGH/C8B53U353NcRhjFp3zX31wQhsJrA7J +p+10S3HbXGrr3aVGMMq3dqSBGp38iKJUmJ3zyVvby5Mk4+8FFmMk3gVuQE52pW4E +OlSVQNQC8yzYsgaG/4N0M8DRpbfPhT5wiD/Qcb7MUXTE96dzs/KcyPJju/aq4cJ6 +DgpbJmM6OZwnx5HYwa58RgOwAVBbsxYOa6oS+Fj02eaiUETwfPHtqF9juCcM5D0m +cLZRT1I4zK60qPb6ZDzuFguXg8hm/djjh2YlDFCNKqCZHktCISTWX5u1cyF5j+UL +3fsKcAAcyiHZV9UH8tr6v0i0P19Uje2ZHk9utJggYSSM0uyqGhmiyd8su2FqitBl +tvTo00Kc8sv4AcDmCng8SVO0og1wiJZdiHJI7QARAQABiQIfBBgBAgAJBQJY8Uba +AhsMAAoJENvbOXRw0SFydu4QALeYG2PPMEOQtMV6jOVT51U0Yo0yl94RJoQCOCCT +/JkUyIDczHmtcVABrpitX3tFl4vacJM3uKWKbzbM7qO2+Hd0u6rxO+o8WUGRMZp5 +IgcbagDOHs0vorVN2Yo0Tl8RoqW91MCvlRFA+8snmKjWfTYj8jxbhIUEtVrIU+5L +DEgDP+T6PvpaVeXfLYItieCsZgib3qPz5mM49jDH84XG5F19kx0QtVGJs7n8FrcA +GcQl/iMrm7dRrRuh9394ongIum0uld287Zlg9q12iJiir3w04Npy43G12RXq9TD9 +aRfbMhQ+HB5Dnvf42mfCfGvalSE0rg9mh1KeaiQUXxCzCf1D6a3H50rh1IDn363W +n41/Hr0j4ntVjvEJxs9nUb8qod2HMOPLOFqwxck7ueGaeDN/GZ5zjPdIppYwE3Lb +CM1ZFLkV+QhFef4zXwml1/AnGGFULgGYorwGCchizhU1wbZVcoUF74MtprnAsuPd +Fxlw+4yCcFEeYVpMDQg/ZfZ28T1GruGHqLJqIVpOum48Ec+fjnHAZAH9dOs/qhBu +CLE+5xUoVyP2lwt0MaHs5SLmxRKhcV6IWRJKTlZ9YdDXbVv5LisL/qDOTjRj7vOg +CPRhklyA0JjFeyTDpSeAWXFZnab0nYBPWkxtdxxRruEeQPAYP1vl0O6ABMxRAI6o +6zII +=e0m+ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/package-builder/libraries/cassandra-cpp-driver/build.sh b/package-builder/libraries/cassandra-cpp-driver/build.sh index 6dcaf36f..ebe8a3a3 100755 --- a/package-builder/libraries/cassandra-cpp-driver/build.sh +++ b/package-builder/libraries/cassandra-cpp-driver/build.sh @@ -7,17 +7,21 @@ source ${DEB_BUILDER_DIR}/functions.sh echo "Building cassandra cpp driver" PNAME="cassandra-cpp-driver" -VERSION=2.7.0 +VERSION=2.16.0 +SONAME=2.16.0 OUTPUT_FILE="${PNAME}_${VERSION}-1~gcp8+1_amd64.deb" if [ ! -f "${ARTIFACT_LIB_DIR}/${OUTPUT_FILE}" ]; then + # Download the source download_from_tarball https://github.com/datastax/cpp-driver/archive/${VERSION}.tar.gz ${VERSION} PACKAGE_DIR=${PACKAGE_DIR}/packaging pushd ${PACKAGE_DIR} sed -i 's/libuv-dev/libuv1-dev/g' debian/control + envsubst '${SONAME}' < debian/cassandra-cpp-driver-dev.links > debian/cassandra-cpp-driver-dev.links + #sed -i 's/\$(SOVER)/2.16.0/g' debian/rules sed -i 's/release=1/release=1~gcp8+1/g' build_deb.sh ./build_deb.sh cp build/*.deb ${ARTIFACT_LIB_DIR} diff --git a/package-builder/libraries/librabbitmq/build.sh b/package-builder/libraries/librabbitmq/build.sh new file mode 100755 index 00000000..ad574218 --- /dev/null +++ b/package-builder/libraries/librabbitmq/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -ex + +source ${DEB_BUILDER_DIR}/functions.sh + +echo "Building lirabbitmq" + +PNAME="librabbitmq" +VERSION="0.11.0" + +OUTPUT_FILE="${PNAME}_${VERSION}-1~gcp8+1_amd64.deb" + +if [ ! -f "${ARTIFACT_LIB_DIR}/${OUTPUT_FILE}" ]; then + # Download the source + download_from_tarball https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v${VERSION}.tar.gz ${VERSION} + + cp -R ${DEB_BUILDER_DIR}/libraries/${PNAME}/debian ./${PACKAGE_DIR} + chmod +x ./${PACKAGE_DIR}/debian/rules + + SOURCEDIR=${BUILD_DIR}/${PACKAGE_DIR} + INSTALL_PREFIX=${SOURCEDIR}/usr + + pushd ${PACKAGE_DIR} + cmake \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ + ${SOURCE_DIR} + + cmake --build . --target install + + dch --create -v "${VERSION}-1~gcp8+1" \ + --package ${PNAME} --empty -M \ + "Build ${VERSION}-1~gcp8+1 of ${PNAME}" + debuild -i -b -us -uc + cp ../*.deb ${ARTIFACT_LIB_DIR} + popd +fi diff --git a/package-builder/libraries/librabbitmq/debian/compat b/package-builder/libraries/librabbitmq/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/compat @@ -0,0 +1 @@ +9 diff --git a/package-builder/libraries/librabbitmq/debian/control b/package-builder/libraries/librabbitmq/debian/control new file mode 100644 index 00000000..20657e1a --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/control @@ -0,0 +1,19 @@ +Source: librabbitmq +Section: libs +Priority: optional +Maintainer: Brian Bradshaw +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.5 +Homepage: https://github.com/alanxz/rabbitmq-c + +Package: librabbitmq +Section: libs +Architecture: any +Depends: libssl1.1, libc6 (>= 2.14) +Description: AMQP client library written in C + +Package: librabbitmq-dev +Section: libdevel +Architecture: any +Depends: librabbitmq (>= 0.11.0) +Description: AMQP client library written in C diff --git a/package-builder/libraries/librabbitmq/debian/copyright b/package-builder/libraries/librabbitmq/debian/copyright new file mode 100644 index 00000000..84c6494a --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/copyright @@ -0,0 +1,36 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libv8 +Upstream-Contact: The V8 Project Authors +Source: https://chromium.googlesource.com/v8/v8/ + +Files: * +Copyright: Copyright 2006-2011, the V8 project authors +License: Custom + Copyright 2006-2011, the V8 project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/* +Copyright: 2017 Google, Inc. +License: Apache-2.0 diff --git a/package-builder/libraries/librabbitmq/debian/librabbitmq-dev.install b/package-builder/libraries/librabbitmq/debian/librabbitmq-dev.install new file mode 100755 index 00000000..ca129fab --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/librabbitmq-dev.install @@ -0,0 +1,5 @@ +#! /usr/bin/dh-exec + +usr/include/* usr/include +usr/lib/${DEB_HOST_MULTIARCH}/*.a usr/lib/${DEB_HOST_MULTIARCH} +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/* usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig \ No newline at end of file diff --git a/package-builder/libraries/librabbitmq/debian/librabbitmq.install b/package-builder/libraries/librabbitmq/debian/librabbitmq.install new file mode 100755 index 00000000..96ac7c37 --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/librabbitmq.install @@ -0,0 +1,3 @@ +#! /usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/*.so.* usr/lib/${DEB_HOST_MULTIARCH} \ No newline at end of file diff --git a/package-builder/libraries/librabbitmq/debian/librabbitmq.links b/package-builder/libraries/librabbitmq/debian/librabbitmq.links new file mode 100755 index 00000000..38c01708 --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/librabbitmq.links @@ -0,0 +1,5 @@ +#! /usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq.so.4.5.0 usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq4.so +usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq.so.4.5.0 usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq.so.4 +usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq.so.4.5.0 usr/lib/${DEB_HOST_MULTIARCH}/librabbitmq.so \ No newline at end of file diff --git a/package-builder/libraries/librabbitmq/debian/rules b/package-builder/libraries/librabbitmq/debian/rules new file mode 100755 index 00000000..79886567 --- /dev/null +++ b/package-builder/libraries/librabbitmq/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +NUMJOBS=1 + +%: + dh $@ -v + +# Copy built files to base package and dev package directories +override_dh_auto_install: + mkdir -p debian/tmp/usr/include + mkdir -p debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/cmake/rabbitmq-c + mkdir -p debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig + mkdir -p debian/tmp/usr/share + cp -R usr debian/tmp/usr + +override_dh_auto_configure: +override_dh_auto_build: +override_dh_auto_test: +override_dh_auto_clean: diff --git a/package-builder/libraries/libv8/build.sh b/package-builder/libraries/libv8/build.sh index 7996806e..df983ae2 100755 --- a/package-builder/libraries/libv8/build.sh +++ b/package-builder/libraries/libv8/build.sh @@ -5,11 +5,17 @@ source ${DEB_BUILDER_DIR}/functions.sh echo "Building libv8" PNAME="libv8" -VERSION=5.9.223 +VERSION=9.1.269 OUTPUT_FILE=${PNAME}_${VERSION}-1~gcp8+1_amd64.deb if [ ! -f "${ARTIFACT_LIB_DIR}/${OUTPUT_FILE}" ]; then + apt-get -y install python2.7 libglib2.0-dev + + if [ ! -f "/usr/bin/python" ]; then + ln -s /usr/bin/python2.7 /usr/bin/python + fi + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH=`pwd`/depot_tools:"$PATH" @@ -20,7 +26,7 @@ if [ ! -f "${ARTIFACT_LIB_DIR}/${OUTPUT_FILE}" ]; then # (optional) If you'd like to build a certain version: git checkout ${VERSION} gclient sync - + # ./build/install-build-deps.sh cp -R ${DEB_BUILDER_DIR}/libraries/libv8/debian . dch --create -v "${VERSION}-1~gcp8+1" \ diff --git a/package-builder/libraries/libv8/debian/rules b/package-builder/libraries/libv8/debian/rules index 112417a7..874a4c33 100644 --- a/package-builder/libraries/libv8/debian/rules +++ b/package-builder/libraries/libv8/debian/rules @@ -4,7 +4,7 @@ dh $@ override_dh_auto_configure: - tools/dev/v8gen.py -vv x64.release -- is_component_build=true + CXX=g++-8 tools/dev/v8gen.py -vv x64.release -- is_component_build=true override_dh_auto_test: diff --git a/perf-dashboard/deployment-latency/phpunit.xml.dist b/perf-dashboard/deployment-latency/phpunit.xml.dist index 8ded8984..aca51f0e 100644 --- a/perf-dashboard/deployment-latency/phpunit.xml.dist +++ b/perf-dashboard/deployment-latency/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/perf-dashboard/deployment-latency/tests/CollectDeploymentLatencyTest.php b/perf-dashboard/deployment-latency/tests/CollectDeploymentLatencyTest.php index 1d8ebb4c..c1830619 100644 --- a/perf-dashboard/deployment-latency/tests/CollectDeploymentLatencyTest.php +++ b/perf-dashboard/deployment-latency/tests/CollectDeploymentLatencyTest.php @@ -55,11 +55,12 @@ private static function createApp($phpVersion) public function testDeploymentLatency() { $phpVersions = [ - '7.1', - '7.2' + '7.3', + '7.4', + '8.0' ]; $types = [ - 'ubuntu16' + 'ubuntu18' ]; $gcloudTrack = getenv('GCLOUD_TRACK') === 'beta' ? 'beta' : ''; foreach ($phpVersions as $phpVersion) { diff --git a/php-base/Dockerfile b/php-base/Dockerfile index b13f205c..1d2709ce 100644 --- a/php-base/Dockerfile +++ b/php-base/Dockerfile @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Dockerfile for PHP 7.1/7.2/7.3/7.4 using nginx as the webserver. +# Dockerfile for PHP 7.3/7.4/8.0 using nginx as the webserver. -FROM gcr.io/gcp-runtimes/ubuntu_16_0_4 +FROM gcr.io/gcp-runtimes/ubuntu_18_0_4 # Install build scripts - composer, nginx, php COPY build-scripts /build-scripts @@ -27,48 +27,105 @@ RUN apt-get update -y && \ apt-get -y upgrade && \ apt-get install -y --no-install-recommends \ curl \ + libssl1.1 \ + openssl \ gettext \ git \ libbz2-1.0 \ libcurl3-gnutls \ + libev4 \ + libevent-2.1-6 \ + libevent-extra-2.1-6 \ + libevent-openssl-2.1-6 \ + libeio1 \ + libext2fs2 \ + # gd + libfontconfig1 \ + libfreetype6 \ + libxpm4 \ + libgd-dev \ + libgd3 \ libgmp10 \ - libicu55 \ + libicu60 \ libjpeg-turbo8 \ + libjudydebian1 \ liblua5.3-0 \ libmcrypt4 \ libmemcached11 \ libmemcachedutil2 \ + libonig4 \ + libexif12 \ + libpcre2-dev \ libpcre3 \ - libpng12-0 \ libpq5 \ - libreadline6 \ + libreadline7 \ librecode0 \ libsasl2-modules \ + libsodium23 \ libsqlite3-0 \ + libtiff5 \ + libwrap0 \ libxml2 \ libxslt1.1 \ + libyaml-0-2 \ + libzip4 \ + imagemagick \ mercurial \ - nginx-extras \ + # vips + liborc-0.4-0 \ + libgif7 \ + libglib2.0-0 \ + libgsf-1-114 \ + libjpeg8 \ + liblcms2-2 \ + libmatio4 \ + libpng16-16 \ + libpoppler-glib8 \ + librsvg2-2 \ + libwebp6 \ + libcairo2 \ + libcfitsio5 \ + fftw3 \ + libopenexr22 \ + libopenslide0 \ + libpango-1.0-0 \ + libwebpdemux2 \ + libwebpmux3 \ + libvips42 \ + # nginx-extras \ + gnupg \ + ca-certificates \ sasl2-bin \ subversion \ supervisor \ wget \ software-properties-common \ apt-transport-https \ + unzip \ + zip \ zlib1g && \ /bin/bash /build-scripts/apt-cleanup.sh +RUN wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1_1.35.0-1_amd64.deb && \ + dpkg -i libuv1_1.35.0-1_amd64.deb + +RUN wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1-dev_1.35.0-1_amd64.deb && \ + dpkg -i libuv1-dev_1.35.0-1_amd64.deb + RUN wget -qO - https://packages.confluent.io/deb/5.0/archive.key | apt-key add - && \ add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.0 stable main" && \ apt-get update && apt-get install -y librdkafka-dev librdkafka1 +RUN add-apt-repository ppa:ondrej/nginx-mainline -y && \ + apt-get update && apt-get install -y nginx-core nginx-common nginx nginx-full libnginx-mod-http-lua && \ + nginx -V + ENV NGINX_DIR=/etc/nginx \ PHP_DIR=/opt/php \ PHP_CONFIG_TEMPLATE=/opt/php-configs \ - PHP71_DIR=/opt/php71 \ - PHP72_DIR=/opt/php72 \ PHP73_DIR=/opt/php73 \ PHP74_DIR=/opt/php74 \ + PHP80_DIR=/opt/php80 \ APP_DIR=/app \ NGINX_USER_CONF_DIR=/etc/nginx/conf.d \ UPLOAD_DIR=/upload \ @@ -79,9 +136,9 @@ ENV NGINX_DIR=/etc/nginx \ DOCUMENT_ROOT=/app \ FRONT_CONTROLLER_FILE=index.php -ARG RUNTIME_DISTRIBUTION="gcp-php-runtime-xenial-unstable" +ARG RUNTIME_DISTRIBUTION="gcp-php-runtime-bionic-unstable" -COPY ${RUNTIME_DISTRUBTION} /${RUNTIME_DISTRUBTION} +COPY ${RUNTIME_DISTRIBUTION} /${RUNTIME_DISTRIBUTION} RUN mkdir -p $PHP_CONFIG_TEMPLATE COPY php-fpm.conf php.ini php-cli.ini "${PHP_CONFIG_TEMPLATE}/" diff --git a/php-base/README.md b/php-base/README.md index 7214e1dc..198aed5f 100644 --- a/php-base/README.md +++ b/php-base/README.md @@ -15,10 +15,10 @@ for internal use only. Please look at the derived image in the - nginx.conf: NGINX configuration script - modified from the configuration script that is bundled with the nginx package. - openssl-version-script.patch: Taken from the debian build for OpenSSL, fixes - issues with "no version information avaialble" when building OpenSSL from + issues with "no version information available" when building OpenSSL from source. (See http://ubuntuforums.org/showthread.php?t=1905963) - php-fpm.conf: PHP FPM configuration, originally bundled with the PHP source code and modified for the Manage VM/Docker environment. -- php.ini: PHP intiialization file, originally bundled with the PHP source +- php.ini: PHP initialization file, originally bundled with the PHP source code and modified for the Manage VM/Docker environment. - supervisord.conf: the supervisord config. diff --git a/php-base/build-scripts/composer.json b/php-base/build-scripts/composer.json new file mode 100644 index 00000000..d2702d06 --- /dev/null +++ b/php-base/build-scripts/composer.json @@ -0,0 +1,8 @@ +{ + "require": { + "composer/semver": "*" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + } +} diff --git a/php-base/build-scripts/composer.sh b/php-base/build-scripts/composer.sh index 7775e14b..0774e32b 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.4" +DEFAULT_PHP_VERSION="8.0" if [ -f ${APP_DIR}/composer.json ]; then if [ -n "${DETECTED_PHP_VERSION}" ]; then @@ -36,32 +36,32 @@ if [ -f ${APP_DIR}/composer.json ]; then if [ "${PHP_VERSION}" == "exact" ]; then cat< ['5.6'], 'couchbase' => ['5.6'], 'ds' => ['5.6'], - 'lua' => ['5.6'], + 'lua' => ['5.6','8.0'], 'memcache' => ['7.0', '7.1', '7.2'], - 'mongo' => ['7.0', '7.1', '7.2'], + 'mongo' => ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0'], 'opencensus' => ['5.6'], - 'stackdriver_debugger' => ['5.6'], - 'v8js' => ['5.6'], + 'phalcon' => ['8.0'], + 'stackdriver_debugger' => ['5.6', '8.0'], + 'v8js' => ['5.6', '7.3', '7.4', '8.0'], 'vips' => ['5.6'], 'yaconf' => ['5.6'] ]; @@ -105,6 +106,8 @@ public function __construct($filename, $configFile = null, $phpVersion = null) $this->phpVersion = $phpVersion; $this->configFile = $configFile ?: $this->defaultConfigFile(); $composer = json_decode(file_get_contents($filename), true); + + print_r(get_loaded_extensions()); if (is_array($composer) && array_key_exists('require', $composer)) { foreach ($composer['require'] as $package => $version) { if (substr($package, 0, 4) == 'ext-') { @@ -121,6 +124,11 @@ public function extensions() public function errors() { + if (is_array($this->errors)) { + echo json_encode($this->errors, JSON_PRETTY_PRINT); + } else { + echo $this->errors; + } return $this->errors; } @@ -153,19 +161,22 @@ public function packageName($extension) private function defaultConfigFile() { - return implode([ - getenv('PHP_DIR'), - 'lib', - 'conf.d', - 'extensions.ini' - ], '/'); + return implode( + '/', + [ + getenv('PHP_DIR'), + 'lib', + 'conf.d', + 'extensions.ini' + ] + ); } private function installPackages() { system('apt-get -y update'); $command = 'apt-get install -y --no-install-recommends ' - . implode(array_map([$this, 'packageName'], $this->extensionsToInstall), ' '); + . implode(' ', array_map([$this, 'packageName'], $this->extensionsToInstall)); echo $command . PHP_EOL; system($command); } diff --git a/php-base/composer.json b/php-base/composer.json index 4e06b572..d2702d06 100644 --- a/php-base/composer.json +++ b/php-base/composer.json @@ -3,6 +3,6 @@ "composer/semver": "*" }, "require-dev": { - "phpunit/phpunit": "^4.8.35" + "phpunit/phpunit": "^9.5" } } diff --git a/php-base/nginx.conf b/php-base/nginx.conf index f264cb68..7e1507af 100644 --- a/php-base/nginx.conf +++ b/php-base/nginx.conf @@ -20,6 +20,8 @@ env FRONT_CONTROLLER_FILE; user www-data; worker_processes auto; error_log /dev/stderr info; +load_module modules/ndk_http_module.so; +load_module modules/ngx_http_lua_module.so; events { worker_connections 4096; @@ -54,8 +56,8 @@ http { server { - set_by_lua $docroot 'return os.getenv("DOCUMENT_ROOT")'; - set_by_lua $front_controller_file 'return os.getenv("FRONT_CONTROLLER_FILE")'; + set_by_lua_block $docroot { return os.getenv("DOCUMENT_ROOT") } + set_by_lua_block $front_controller_file { return os.getenv("FRONT_CONTROLLER_FILE") } listen 8080; root $docroot; diff --git a/php-base/php-base.yaml b/php-base/php-base.yaml index cecff1d8..68966c5c 100644 --- a/php-base/php-base.yaml +++ b/php-base/php-base.yaml @@ -1,12 +1,11 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "php-missing" - command: ["which", "php"] + command: "which" + args: ["php"] exitCode: 1 expectedOutput: [""] - - name: "php71-version" - command: ["cat", "/opt/php71_version"] - expectedOutput: ["7\\.1.*"] -licenseTests: - - debian: true - files: [] + - name: "php73-version" + command: "cat" + args: ["/opt/php73_version"] + expectedOutput: ["7\\.3.*"] diff --git a/php-base/phpunit.xml.dist b/php-base/phpunit.xml.dist index 8ded8984..13040a33 100644 --- a/php-base/phpunit.xml.dist +++ b/php-base/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/php-base/tests/DetectPhpVersionTest.php b/php-base/tests/DetectPhpVersionTest.php index f9b27560..266a0b08 100644 --- a/php-base/tests/DetectPhpVersionTest.php +++ b/php-base/tests/DetectPhpVersionTest.php @@ -21,60 +21,69 @@ class DetectPhpVersionTest extends TestCase { - const PHP_71 = '7.1.3'; + const PHP_73 = '7.3.28'; + const PHP_74 = '7.4.19'; + const PHP_80 = '8.0.6'; const AVAILABLE_VERSIONS = [ - self::PHP_71, + self::PHP_73, + self::PHP_74, + self::PHP_80, ]; public function testDetectsPhpVersionFromComposer() { - $version = DetectPhpVersion::versionFromComposer(__DIR__ . '/samples/phalcon.json', self::AVAILABLE_VERSIONS); - $this->assertEquals(self::PHP_71, $version); + $version = DetectPhpVersion::versionFromComposer(__DIR__ . '/samples/oauth.json', self::AVAILABLE_VERSIONS); + $this->assertEquals(self::PHP_80, $version); } public function testDetectsHighestVersion() { - $version = DetectPhpVersion::version('^7', self::AVAILABLE_VERSIONS); - $this->assertEquals(self::PHP_71, $version); + $version = DetectPhpVersion::version('^8', self::AVAILABLE_VERSIONS); + $this->assertEquals(self::PHP_80, $version); } /** - * @expectedException \ExactVersionException + * @expectedException ExactVersionException */ public function testExactVersionDirect() { - $version = DetectPhpVersion::version('7.1.10', self::AVAILABLE_VERSIONS); + $this->expectException(ExactVersionException::class); + $version = DetectPhpVersion::version('8.0.3', self::AVAILABLE_VERSIONS); } /** - * @expectedException \InvalidVersionException + * @expectedException InvalidVersionException */ public function testInvalidVersionDirect() { - $version = DetectPhpVersion::version('^7.1.100', self::AVAILABLE_VERSIONS); + $this->expectException(InvalidVersionException::class); + $version = DetectPhpVersion::version('^8.0.100', self::AVAILABLE_VERSIONS); } /** - * @expectedException \ExactVersionException + * @expectedException ExactVersionException */ public function testExactVersion() { + $this->expectException(ExactVersionException::class); $version = DetectPhpVersion::versionFromComposer(__DIR__ . '/samples/exact.json', self::AVAILABLE_VERSIONS); } /** - * @expectedException \NoSpecifiedVersionException + * @expectedException NoSpecifiedVersionException */ public function testNoVersionString() { + $this->expectException(NoSpecifiedVersionException::class); $version = DetectPhpVersion::versionFromComposer(__DIR__ . '/samples/no_version.json', self::AVAILABLE_VERSIONS); } /** - * @expectedException \InvalidVersionException + * @expectedException InvalidVersionException */ public function testInvalidVersion() { + $this->expectException(InvalidVersionException::class); $version = DetectPhpVersion::versionFromComposer(__DIR__ . '/samples/invalid.json', self::AVAILABLE_VERSIONS); } } diff --git a/php-base/tests/InstallExtensionsTest.php b/php-base/tests/InstallExtensionsTest.php index 74557dca..41ee2916 100644 --- a/php-base/tests/InstallExtensionsTest.php +++ b/php-base/tests/InstallExtensionsTest.php @@ -23,14 +23,25 @@ class InstallExtensionsTest extends TestCase { public function testDetectsPackagedExtensions() { - $installer = new InstallExtensions(__DIR__ . '/samples/phalcon.json'); - $this->assertEquals(['phalcon'], $installer->extensions(), implode(',', $installer->errors())); + $output = null; + $retval = null; + + echo "Available PHP Modules \n"; + exec('php -m', $output, $retval); + print_r($output); + echo "\n"; + echo "Nginx Modules\n"; + exec('ls -al /usr/lib/nginx/modules', $output, $retval); + print_r($output); + + $installer = new InstallExtensions(__DIR__ . '/samples/oauth.json'); + $this->assertEquals(['oauth'], $installer->extensions(), implode(',', $installer->errors())); } public function testDetectsSharedExtensions() { $installer = new InstallExtensions(__DIR__ . '/samples/shared.json'); - $this->assertEquals(['sqlite3'], $installer->extensions()); + $this->assertEquals(['ev'], $installer->extensions()); } public function testInstallsExtensions() @@ -38,7 +49,7 @@ public function testInstallsExtensions() $output = tempnam("/tmp", "php.ini"); $installer = new InstallExtensions(__DIR__ . '/samples/shared.json', $output); $this->assertTrue($installer->installExtensions()); - $this->assertEquals("extension=sqlite3.so\n", file_get_contents($output)); + $this->assertEquals("extension=ev.so\n", file_get_contents($output)); unlink($output); } diff --git a/php-base/tests/StackdriverIntegrationTest.php b/php-base/tests/StackdriverIntegrationTest.php index 12c93774..4ded6367 100644 --- a/php-base/tests/StackdriverIntegrationTest.php +++ b/php-base/tests/StackdriverIntegrationTest.php @@ -21,13 +21,19 @@ class StackdriverIntegrationTest extends TestCase { private $oldpwd; - public function setUp() + public function setUp(): void { + if (!extension_loaded('stackdriver_debugger')) { + $this->markTestSkipped( + 'The stackdriver_debugger extension is not available.' + ); + } + parent::setUp(); $this->oldpwd = getcwd(); } - public function tearDown() + public function tearDown(): void { chdir($this->oldpwd); parent::tearDown(); @@ -70,7 +76,7 @@ public function testInvalidVersions($directory) exec("php stackdriver-files/enable_stackdriver_prepend.php -a $dir", $output, $retVal); $this->assertNotEquals(0, $retVal, 'command: ' . implode(';', $output) . ' should have failed.'); - $this->assertContains('You must include', $output[0]); + $this->assertStringContainsString('You must include', $output[0]); } public function invalidVersions() @@ -88,6 +94,6 @@ public function testNoComposer() $dir = realpath(__DIR__ . '/samples/no_composer'); exec("php stackdriver-files/enable_stackdriver_prepend.php -a $dir", $output, $retVal); $this->assertNotEquals(0, $retVal, 'command: ' . implode(';', $output) . ' should have failed.'); - $this->assertContains('You must include', $output[0]); + $this->assertStringContainsString('You must include', $output[0]); } } diff --git a/php-base/tests/samples/bad_combo.json b/php-base/tests/samples/bad_combo.json index 720ee20d..681f2dd0 100644 --- a/php-base/tests/samples/bad_combo.json +++ b/php-base/tests/samples/bad_combo.json @@ -1,6 +1,6 @@ { "require": { - "php": "7.1.*", + "php": "8.0.*", "ext-phalcon": "*" } } diff --git a/php-base/tests/samples/exact.json b/php-base/tests/samples/exact.json index 2c563112..839fe801 100644 --- a/php-base/tests/samples/exact.json +++ b/php-base/tests/samples/exact.json @@ -1,5 +1,5 @@ { "require": { - "php": "7.1.29" + "php": "8.0.5" } } diff --git a/php-base/tests/samples/mixed.json b/php-base/tests/samples/mixed.json index d6962926..7b9e8371 100644 --- a/php-base/tests/samples/mixed.json +++ b/php-base/tests/samples/mixed.json @@ -1,7 +1,7 @@ { "require": { - "php": "7.1.*", - "ext-phalcon": "*", + "php": "8.0.*", + "ext-oauth": "*", "ext-sqlite3": "*" } } diff --git a/php-base/tests/samples/oauth.json b/php-base/tests/samples/oauth.json new file mode 100644 index 00000000..4087f752 --- /dev/null +++ b/php-base/tests/samples/oauth.json @@ -0,0 +1,6 @@ +{ + "require": { + "php": "8.0.*", + "ext-oauth": "*" + } +} diff --git a/php-base/tests/samples/shared.json b/php-base/tests/samples/shared.json index 0d1feb26..da5369b9 100644 --- a/php-base/tests/samples/shared.json +++ b/php-base/tests/samples/shared.json @@ -1,6 +1,6 @@ { "require": { - "php": "7.1.*", - "ext-sqlite3": "*" + "php": "8.0.*", + "ext-ev": "*" } } diff --git a/php-onbuild/Dockerfile.in b/php-onbuild/Dockerfile.in index 86612554..0b59a920 100644 --- a/php-onbuild/Dockerfile.in +++ b/php-onbuild/Dockerfile.in @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Dockerfile for PHP 5.6/7.0/7.1 using nginx as the webserver. +# Dockerfile for PHP 7.3/7.4/8.0 using nginx as the webserver. -FROM ${PHP_71_IMAGE} +FROM ${PHP_80_IMAGE} # Allow customizing some composer flags ONBUILD ARG COMPOSER_FLAGS='--no-scripts --no-dev --prefer-dist' diff --git a/php-onbuild/php.yaml b/php-onbuild/php.yaml index fcc6b609..ae78f6b5 100644 --- a/php-onbuild/php.yaml +++ b/php-onbuild/php.yaml @@ -1,11 +1,10 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "php-path" - command: ["which", "php"] + command: "which" + args: ["php"] expectedOutput: ["/opt/php/bin/php"] - name: "version" - command: ["php", "-v"] - expectedOutput: ["PHP 7\\.1.*"] -licenseTests: - - debian: true - files: [] + command: "php" + args: ["-v"] + expectedOutput: ["PHP 8\\.0.*"] diff --git a/php-versioned/Dockerfile.in b/php-versioned/Dockerfile.in index 82d0771f..f0f3e92b 100644 --- a/php-versioned/Dockerfile.in +++ b/php-versioned/Dockerfile.in @@ -12,19 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Dockerfile for PHP 5.6/7.0/7.1 using nginx as the webserver. +# Dockerfile for PHP 7.3/7.4/8.0 using nginx as the webserver. FROM ${PHP_BASE_IMAGE} -ARG PHP_VERSION=7.1 +ARG PHP_VERSION=8.0 -RUN /bin/bash /build-scripts/install_php.sh && \ - /bin/bash /build-scripts/install_composer.sh && \ - chgrp www-data /build-scripts/detect_php_version.php && \ +RUN /bin/bash /build-scripts/install_php.sh +RUN /bin/bash /build-scripts/install_composer.sh +RUN chgrp www-data /build-scripts/detect_php_version.php # Temporary enable the shell for www-data # We will disable it in lockdown.sh - cp /composer.json /build-scripts/ && \ - chown -R www-data:www-data /build-scripts/ && \ +RUN if [ -f "/composer.json" ]; then cp /composer.json /build-scripts/ ; fi +RUN chown -R www-data:www-data /build-scripts/ && \ chsh -s /bin/bash www-data && \ - cd /build-scripts && \ - su www-data -c "php /usr/local/bin/composer require composer/semver" + cd /build-scripts && \ + su www-data -c "php /usr/local/bin/composer require composer/semver" diff --git a/php-versioned/php73.yaml b/php-versioned/php73.yaml index 2ff9b345..9ed5c830 100644 --- a/php-versioned/php73.yaml +++ b/php-versioned/php73.yaml @@ -1,11 +1,11 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "php-path" - command: ["which", "php"] + command: "which" + args: ["php"] expectedOutput: ["/opt/php/bin/php"] - name: "version" - command: ["php", "-v"] + command: "php" + args: ["-v"] expectedOutput: ["PHP 7\\.3.*"] -licenseTests: - - debian: true - files: [] + diff --git a/php-versioned/php74.yaml b/php-versioned/php74.yaml index f0409930..be109f7c 100644 --- a/php-versioned/php74.yaml +++ b/php-versioned/php74.yaml @@ -1,11 +1,11 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "php-path" - command: ["which", "php"] + command: "which" + args: ["php"] expectedOutput: ["/opt/php/bin/php"] - name: "version" - command: ["php", "-v"] + command: "php" + args: ["-v"] expectedOutput: ["PHP 7\\.4.*"] -licenseTests: - - debian: true - files: [] + diff --git a/php-versioned/php80.yaml b/php-versioned/php80.yaml new file mode 100644 index 00000000..6bd78bde --- /dev/null +++ b/php-versioned/php80.yaml @@ -0,0 +1,11 @@ +schemaVersion: "2.0.0" +commandTests: + - name: "php-path" + command: "which" + args: ["php"] + expectedOutput: ["/opt/php/bin/php"] + - name: "version" + command: "php" + args: ["-v"] + expectedOutput: ["PHP 8\\.0.*"] + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6a8b236b..04a6be6d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/scripts/build_images.sh b/scripts/build_images.sh index 46f5d13e..6628b7ce 100755 --- a/scripts/build_images.sh +++ b/scripts/build_images.sh @@ -25,15 +25,21 @@ if [ -z "${GOOGLE_PROJECT_ID}" ]; then exit 1 fi +if [ -z "${GCP_PACKAGE_BUCKET}" ]; then + GCP_PACKAGE_BUCKET='gcp-php-packages' +fi + echo "Building ubuntu images" -DEFAULT_RUNTIME_DISTRIBUTION="gcp-php-runtime-xenial-unstable" +DEFAULT_RUNTIME_DISTRIBUTION="gcp-php-runtime-bionic-unstable" CLOUDBUILD_CONFIG="cloudbuild-ubuntu.yaml" export PHP_BASE_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php-base:${TAG}" export BASE_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php:${TAG}" -export PHP_71_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php71:${TAG}" -export PHP_72_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php71:${TAG}" -export TEST_RUNNER_BASE_IMAGE=${PHP_71_IMAGE} +export PHP_73_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php73:${TAG}" +export PHP_74_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php74:${TAG}" +export PHP_80_IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/php80:${TAG}" +export TEST_RUNNER_BASE_IMAGE=${PHP_80_IMAGE} +# export TEST_RUNNER_BASE_IMAGE=${PHP_73_IMAGE} if [ -z "${RUNTIME_DISTRIBUTION}" ]; then RUNTIME_DISTRIBUTION="${DEFAULT_RUNTIME_DISTRIBUTION}" @@ -43,7 +49,7 @@ export RUNTIME_DISTRIBUTION for TEMPLATE in `find . -name Dockerfile.in` do - envsubst '${BASE_IMAGE} ${PHP_BASE_IMAGE} ${PHP_71_IMAGE} ${PHP_72_IMAGE} ${TEST_RUNNER_BASE_IMAGE}' \ + envsubst '${BASE_IMAGE} ${PHP_BASE_IMAGE} ${PHP_73_IMAGE} ${PHP_74_IMAGE} ${PHP_80_IMAGE} ${TEST_RUNNER_BASE_IMAGE}' \ < ${TEMPLATE} \ > $(dirname ${TEMPLATE})/$(basename -s .in ${TEMPLATE}) done @@ -51,7 +57,7 @@ done gcloud builds submit . \ --config "${CLOUDBUILD_CONFIG}" \ --timeout 3600 \ - --substitutions _GOOGLE_PROJECT_ID=$GOOGLE_PROJECT_ID,_TAG=$TAG,_RUNTIME_DISTRIBUTION=$RUNTIME_DISTRIBUTION + --substitutions _GOOGLE_PROJECT_ID=$GOOGLE_PROJECT_ID,_TAG=$TAG,_GCP_PACKAGE_BUCKET=$GCP_PACKAGE_BUCKET,_RUNTIME_DISTRIBUTION=$RUNTIME_DISTRIBUTION if [ -z "${RUN_E2E_TESTS}" ] then diff --git a/scripts/check_versions.sh b/scripts/check_versions.sh index e163acb7..a5620e4a 100755 --- a/scripts/check_versions.sh +++ b/scripts/check_versions.sh @@ -22,10 +22,18 @@ if [ ! -f "${PHP_DOCKER_GOOGLE_CREDENTIALS}" ]; then exit 1 fi +if [ -z "${GOOGLE_CONTAINER_REGISTRY}" ]; then + GOOGLE_CONTAINER_REGISTRY="google-appengine" +fi + +if [ -z "${TEST_RUNNER_BASE_TAG}" ]; then + TEST_RUNNER_BASE_TAG="latest" +fi + SRC_TMP=$(mktemp -d) # build the php test runner -export TEST_RUNNER_BASE_IMAGE="gcr.io/google-appengine/php71:latest" +export TEST_RUNNER_BASE_IMAGE="gcr.io/${GOOGLE_CONTAINER_REGISTRY}/php80:${TEST_RUNNER_BASE_TAG}" envsubst '${TEST_RUNNER_BASE_IMAGE}' \ < cloudbuild-test-runner/Dockerfile.in \ > cloudbuild-test-runner/Dockerfile @@ -38,5 +46,5 @@ gcloud -q builds submit --tag "${TEST_RUNNER}" \ # Check the version gcloud -q builds submit check-versions \ --config check-versions/cloudbuild.yaml \ - --substitutions _TEST_RUNNER="${TEST_RUNNER}" + --substitutions _TEST_RUNNER="${TEST_RUNNER}",_CONTAINER_REGISTRY="${GOOGLE_CONTAINER_REGISTRY}" diff --git a/scripts/install_test_dependencies.sh b/scripts/install_test_dependencies.sh index 56f0de64..fa3c2e85 100755 --- a/scripts/install_test_dependencies.sh +++ b/scripts/install_test_dependencies.sh @@ -74,6 +74,8 @@ if [ ! -f "${PHP_DOCKER_GOOGLE_CREDENTIALS}" ]; then exit 1 fi +# Authorize the service account +gcloud -q auth activate-service-account --key-file ${PHP_DOCKER_GOOGLE_CREDENTIALS} if [ "${CIRCLECI}" == "true" ]; then # Need sudo on circleci: diff --git a/scripts/record_deployment_latency.sh b/scripts/record_deployment_latency.sh index ada90ad0..6bba8c76 100755 --- a/scripts/record_deployment_latency.sh +++ b/scripts/record_deployment_latency.sh @@ -32,7 +32,7 @@ TEST_RUNNER="gcr.io/${GOOGLE_PROJECT_ID}/php-test-runner:${TAG}" if [ -n "${REBUILD_TEST_RUNNER}" ]; then # build the php test runner - export TEST_RUNNER_BASE_IMAGE="gcr.io/google-appengine/php74:latest" + export TEST_RUNNER_BASE_IMAGE="gcr.io/google-appengine/php80:latest" envsubst '${TEST_RUNNER_BASE_IMAGE}' \ < cloudbuild-test-runner/Dockerfile.in \ > cloudbuild-test-runner/Dockerfile diff --git a/scripts/release.sh b/scripts/release.sh index 2d7e68b6..dfa98d0d 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -19,30 +19,27 @@ scripts/build_images.sh IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php:${TAG}" BASE_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php-base:${TAG}" +PHP80_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php80:${TAG}" PHP74_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php74:${TAG}" PHP73_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php73:${TAG}" -PHP72_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php72:${TAG}" -PHP71_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php71:${TAG}" BUILDER_IMAGE_NAME="gcr.io/${GOOGLE_PROJECT_ID}/php/gen-dockerfile:${TAG}" if [ "${ADD_CANDIDATE_TAG}" = "true" ]; then echo "CANDIDATE_TAG:${CANDIDATE_TAG}" gcloud -q beta container images add-tag "${IMAGE_NAME}" "${DOCKER_NAMESPACE}/php:${CANDIDATE_TAG}" gcloud -q beta container images add-tag "${BASE_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php-base:${CANDIDATE_TAG}" + gcloud -q beta container images add-tag "${PHP80_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php80:${CANDIDATE_TAG}" gcloud -q beta container images add-tag "${PHP74_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php74:${CANDIDATE_TAG}" gcloud -q beta container images add-tag "${PHP73_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php73:${CANDIDATE_TAG}" - gcloud -q beta container images add-tag "${PHP72_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php72:${CANDIDATE_TAG}" - gcloud -q beta container images add-tag "${PHP71_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php71:${CANDIDATE_TAG}" fi if [ "${ADD_STAGING_TAG}" = "true" ]; then gcloud -q beta container images add-tag "${IMAGE_NAME}" "${DOCKER_NAMESPACE}/php:staging" gcloud -q beta container images add-tag "${BASE_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php-base:staging" + gcloud -q beta container images add-tag "${PHP80_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php80:staging" gcloud -q beta container images add-tag "${PHP74_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php74:staging" gcloud -q beta container images add-tag "${PHP73_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php73:staging" - gcloud -q beta container images add-tag "${PHP72_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php72:staging" - gcloud -q beta container images add-tag "${PHP71_IMAGE_NAME}" "${DOCKER_NAMESPACE}/php71:staging" gcloud -q beta container images add-tag "${BUILDER_IMAGE_NAME}" "${BUILDER_DOCKER_NAMESPACE}/php/gen-dockerfile:staging" fi @@ -50,7 +47,6 @@ METADATA=$(pwd)/METADATA cd ${KOKORO_GFILE_DIR}/kokoro python note.py php -m ${METADATA} -t ${TAG} python note.py php-base -m ${METADATA} -t ${TAG} +python note.py php80 -m ${METADATA} -t ${TAG} python note.py php74 -m ${METADATA} -t ${TAG} python note.py php73 -m ${METADATA} -t ${TAG} -python note.py php72 -m ${METADATA} -t ${TAG} -python note.py php71 -m ${METADATA} -t ${TAG} diff --git a/scripts/run_acceptance_tests.sh b/scripts/run_acceptance_tests.sh index 021f5a68..5da889c2 100755 --- a/scripts/run_acceptance_tests.sh +++ b/scripts/run_acceptance_tests.sh @@ -28,12 +28,14 @@ fi export PHP_BASE_IMAGE="gcr.io/google-appengine/php-base" export BASE_IMAGE="gcr.io/google-appengine/php" -export PHP_71_IMAGE="gcr.io/google-appengine/php71" -export TEST_RUNNER_BASE_IMAGE=${PHP_71_IMAGE} +export PHP_73_IMAGE="gcr.io/google-appengine/php73" +export PHP_74_IMAGE="gcr.io/google-appengine/php74" +export PHP_80_IMAGE="gcr.io/google-appengine/php80" +export TEST_RUNNER_BASE_IMAGE=${PHP_80_IMAGE} for TEMPLATE in `find . -name Dockerfile.in` do - envsubst '${BASE_IMAGE} ${PHP_BASE_IMAGE} ${PHP_71_IMAGE} ${TEST_RUNNER_BASE_IMAGE}' \ + envsubst '${BASE_IMAGE} ${PHP_BASE_IMAGE} ${PHP_73_IMAGE} ${TEST_RUNNER_BASE_IMAGE}' \ < ${TEMPLATE} \ > $(dirname ${TEMPLATE})/$(basename -s .in ${TEMPLATE}) done diff --git a/scripts/ubuntu-packages.cfg b/scripts/ubuntu-packages.cfg index 5fae0316..c730e476 100644 --- a/scripts/ubuntu-packages.cfg +++ b/scripts/ubuntu-packages.cfg @@ -5,6 +5,6 @@ env_vars { env_vars { key: "PHP_VERSIONS" - value: "7.4.12-1,7.3.23-1,7.2.34-1,7.1.33-1" + value: "7.3.28-1,7.4.19-1,8.0.6-1" } diff --git a/scripts/update-gcs.sh b/scripts/update-gcs.sh index c5afe29f..f5e1d3b6 100755 --- a/scripts/update-gcs.sh +++ b/scripts/update-gcs.sh @@ -8,6 +8,10 @@ if [ -z "${DEB_TMP_DIR}" ]; then DEB_TMP_DIR='/tmp/php-build' fi +if [ -z "${GCP_PACKAGE_BUCKET}" ]; then + GCP_PACKAGE_BUCKET='gcp-php-packages' +fi + if [ -z "${DEBIAN_GCS_PATH}" ]; then DEBIAN_GCS_PATH='gs://php-mvm-a/packages' fi @@ -23,7 +27,7 @@ if [ "${1}" == "debian" ]; then else GCS_PATH=${UBUNTU_GCS_PATH} TARGET_DIR=${DEB_TMP_DIR}/ubuntu - GCS_DESTINATION='gcp-php-runtime-xenial' + GCS_DESTINATION='gcp-php-runtime-bionic' fi mkdir -p ${TARGET_DIR} @@ -44,18 +48,18 @@ gsutil -m cp "${GCS_PATH}/libraries/*.deb" $TARGET_DIR echo 'Dedupping deb packages' echo '=============================================' -php /google/data/ro/teams/php-cloud/php-debian-package-dedup/dedup.php "${1}" +#php /google/data/ro/teams/php-cloud/php-debian-package-dedup/dedup.php "${1}" # We're going to mirror rapture's naming scheme to make the switch to GCS as # seamless as possible. -gsutil -m rm -r gs://gcp-php-packages/${GCS_DESTINATION} -gsutil -m rm -r gs://gcp-php-packages/${GCS_DESTINATION}-unstable +#gsutil -m rm -r gs://${GCP_PACKAGE_BUCKET}/${GCS_DESTINATION} +#gsutil -m rm -r gs://${GCP_PACKAGE_BUCKET}/${GCS_DESTINATION}-unstable -gsutil -m cp ${TARGET_DIR}/*.deb gs://gcp-php-packages/${GCS_DESTINATION} -gsutil -m cp ${TARGET_DIR}/*.deb gs://gcp-php-packages/${GCS_DESTINATION}-unstable +gsutil -m cp ${TARGET_DIR}/*.deb gs://${GCP_PACKAGE_BUCKET}/${GCS_DESTINATION} +gsutil -m cp ${TARGET_DIR}/*.deb gs://${GCP_PACKAGE_BUCKET}/${GCS_DESTINATION}-unstable readonly RUNTIME_DIST="${GCS_DESTINATION}-$(date +%Y%m%d-1)" -gsutil -m cp ${TARGET_DIR}/*.deb "gs://gcp-php-packages/${RUNTIME_DIST}" +gsutil -m cp ${TARGET_DIR}/*.deb "gs://${GCP_PACKAGE_BUCKET}/${RUNTIME_DIST}" echo "" echo "-----------------------------------------------------------------------" diff --git a/testapps/build_pipeline/composer.json b/testapps/build_pipeline/composer.json index ced43480..0825817b 100644 --- a/testapps/build_pipeline/composer.json +++ b/testapps/build_pipeline/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "7.1.*", + "php": "7.3.*", "ext-grpc": "*", "ext-mailparse": "*", "ext-mbstring": "*", diff --git a/testapps/build_pipeline/tests/composer.json b/testapps/build_pipeline/tests/composer.json index f83675f1..137ed877 100644 --- a/testapps/build_pipeline/tests/composer.json +++ b/testapps/build_pipeline/tests/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "google/cloud-tools": "~0.6", + "google/cloud-tools": "^0.12", "guzzlehttp/guzzle": "~6.0", - "symfony/browser-kit": "~2" + "symfony/browser-kit": "~5" } } diff --git a/testapps/build_pipeline/tests/phpunit.xml.dist b/testapps/build_pipeline/tests/phpunit.xml.dist index 8ded8984..9dff6223 100644 --- a/testapps/build_pipeline/tests/phpunit.xml.dist +++ b/testapps/build_pipeline/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/build_pipeline/tests/tests/EndToEndTest.php b/testapps/build_pipeline/tests/tests/EndToEndTest.php index a389f9e3..fc9db30a 100644 --- a/testapps/build_pipeline/tests/tests/EndToEndTest.php +++ b/testapps/build_pipeline/tests/tests/EndToEndTest.php @@ -33,7 +33,7 @@ class EndToEndTest extends TestCase const SERVICE_ACCOUNT_ENV = 'SERVICE_ACCOUNT_JSON'; const RUNTIME_BUILDER_ROOT_ENV = 'RUNTIME_BUILDER_ROOT'; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $project_id = getenv(self::PROJECT_ENV); $e2e_test_version = getenv(self::VERSION_ENV); @@ -112,7 +112,7 @@ public static function deploy($project_id, $e2e_test_version) self::fail('Deployment failed.'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // TODO: check the return value and maybe retry? $cmd = sprintf( @@ -140,7 +140,7 @@ private static function execWithError($command, $errorPrefix) } } - public function setUp() + public function setUp(): void { $this->eventuallyConsistentRetryCount = 10; $this->catchAllExceptions = true; @@ -159,7 +159,7 @@ public function testIndex() $resp = $this->client->get('index.php'); $this->assertEquals('200', $resp->getStatusCode(), 'index.php status code'); - $this->assertContains('Hello World', $resp->getBody()->getContents()); + $this->assertStringContainsString('Hello World', $resp->getBody()->getContents()); }); } @@ -170,7 +170,7 @@ public function testHttpsEnv() $resp = $this->client->get('https-env.php'); $this->assertEquals('200', $resp->getStatusCode(), 'https-env.php status code'); - $this->assertContains('HTTPS: on', $resp->getBody()->getContents()); + $this->assertStringContainsStringntainsString('HTTPS: on', $resp->getBody()->getContents()); }); } @@ -182,7 +182,7 @@ public function testGoodbye() $resp = $this->client->get('/goodbye'); $this->assertEquals('200', $resp->getStatusCode(), '/goodbye status code'); - $this->assertContains('Goodbye World', + $this->assertStringContainsString('Goodbye World', $resp->getBody()->getContents()); }); } @@ -209,7 +209,7 @@ public function testExtensionIni() $body = $resp->getBody()->getContents(); foreach ($extMap as $ext => $shouldBeInIni) { if ($shouldBeInIni) { - $this->assertContains( + $this->assertStringContainsString( $ext, $body, "$ext should be in extensions.ini file" @@ -271,7 +271,7 @@ public function testExec() $resp->getStatusCode(), 'exec.php status code' ); - $this->assertContains( + $this->assertStringContainsString( 'exec succeeded.', $resp->getBody()->getContents() ); @@ -285,7 +285,7 @@ public function testPdoSqlite() $resp = $this->client->get('pdo_sqlite.php'); $this->assertEquals('200', $resp->getStatusCode(), 'pdo_sqlite.php status code'); - $this->assertContains('Hello pdo_sqlite', + $this->assertStringContainsString('Hello pdo_sqlite', $resp->getBody()->getContents()); }); } @@ -297,7 +297,7 @@ public function testSessionSaveHandler() $resp = $this->client->get('session_save_handler.php'); $this->assertEquals('200', $resp->getStatusCode(), 'session_save_handler status code'); - $this->assertContains('memcached', + $this->assertStringContainsString('memcached', $resp->getBody()->getContents()); }); } @@ -334,7 +334,7 @@ public function testVersion() $resp = $this->client->get('version.php'); $this->assertEquals('200', $resp->getStatusCode(), 'version.php status code'); - $this->assertContains('7.1', + $this->assertStringContainsString('7.3', $resp->getBody()->getContents()); }); } diff --git a/testapps/build_pipeline_std/composer.json b/testapps/build_pipeline_std/composer.json index db09e2d4..512f9825 100644 --- a/testapps/build_pipeline_std/composer.json +++ b/testapps/build_pipeline_std/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "7.1.*", + "php": "7.3.*", "ext-grpc": "*", "ext-mailparse": "*", "ext-mbstring": "*", diff --git a/testapps/build_pipeline_std/tests/composer.json b/testapps/build_pipeline_std/tests/composer.json index f83675f1..137ed877 100644 --- a/testapps/build_pipeline_std/tests/composer.json +++ b/testapps/build_pipeline_std/tests/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "google/cloud-tools": "~0.6", + "google/cloud-tools": "^0.12", "guzzlehttp/guzzle": "~6.0", - "symfony/browser-kit": "~2" + "symfony/browser-kit": "~5" } } diff --git a/testapps/build_pipeline_std/tests/phpunit.xml.dist b/testapps/build_pipeline_std/tests/phpunit.xml.dist index 8ded8984..606cbe24 100644 --- a/testapps/build_pipeline_std/tests/phpunit.xml.dist +++ b/testapps/build_pipeline_std/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/build_pipeline_std/tests/tests/EndToEndTest.php b/testapps/build_pipeline_std/tests/tests/EndToEndTest.php index fe53971f..f0c6291f 100644 --- a/testapps/build_pipeline_std/tests/tests/EndToEndTest.php +++ b/testapps/build_pipeline_std/tests/tests/EndToEndTest.php @@ -33,7 +33,7 @@ class EndToEndTest extends TestCase const SERVICE_ACCOUNT_ENV = 'SERVICE_ACCOUNT_JSON'; const RUNTIME_BUILDER_ROOT_ENV = 'RUNTIME_BUILDER_ROOT'; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $project_id = getenv(self::PROJECT_ENV); $e2e_test_version = getenv(self::VERSION_ENV); @@ -111,7 +111,7 @@ public static function deploy($project_id, $e2e_test_version) self::fail('Deployment failed.'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // TODO: check the return value and maybe retry? $cmd = sprintf( @@ -139,8 +139,7 @@ private static function execWithError($command, $errorPrefix) } } - public function setUp() - { + public function setUp(): void { $this->eventuallyConsistentRetryCount = 10; $this->catchAllExceptions = true; @@ -158,7 +157,7 @@ public function testIndex() $resp = $this->client->get('index.php'); $this->assertEquals('200', $resp->getStatusCode(), 'index.php status code'); - $this->assertContains('Hello World', $resp->getBody()->getContents()); + $this->assertStringContainsString('Hello World', $resp->getBody()->getContents()); }); } @@ -169,7 +168,7 @@ public function testHttpsEnv() $resp = $this->client->get('https-env.php'); $this->assertEquals('200', $resp->getStatusCode(), 'https-env.php status code'); - $this->assertContains('HTTPS: on', $resp->getBody()->getContents()); + $this->assertStringContainsString('HTTPS: on', $resp->getBody()->getContents()); }); } @@ -181,7 +180,7 @@ public function testGoodbye() $resp = $this->client->get('/goodbye'); $this->assertEquals('200', $resp->getStatusCode(), '/goodbye status code'); - $this->assertContains('Goodbye World', + $this->assertStringContainsString('Goodbye World', $resp->getBody()->getContents()); }); } @@ -208,7 +207,7 @@ public function testExtensionIni() $body = $resp->getBody()->getContents(); foreach ($extMap as $ext => $shouldBeInIni) { if ($shouldBeInIni) { - $this->assertContains( + $this->assertStringContainsString( $ext, $body, "$ext should be in extensions.ini file" @@ -270,7 +269,7 @@ public function testExec() $resp->getStatusCode(), 'exec.php status code' ); - $this->assertContains( + $this->assertStringContainsString( 'exec succeeded.', $resp->getBody()->getContents() ); @@ -284,7 +283,7 @@ public function testPdoSqlite() $resp = $this->client->get('pdo_sqlite.php'); $this->assertEquals('200', $resp->getStatusCode(), 'pdo_sqlite.php status code'); - $this->assertContains('Hello pdo_sqlite', + $this->assertStringContainsString('Hello pdo_sqlite', $resp->getBody()->getContents()); }); } @@ -296,7 +295,7 @@ public function testSessionSaveHandler() $resp = $this->client->get('session_save_handler.php'); $this->assertEquals('200', $resp->getStatusCode(), 'session_save_handler status code'); - $this->assertContains('memcached', + $this->assertStringContainsString('memcached', $resp->getBody()->getContents()); }); } @@ -333,7 +332,7 @@ public function testVersion() $resp = $this->client->get('version.php'); $this->assertEquals('200', $resp->getStatusCode(), 'version.php status code'); - $this->assertContains('7.1', + $this->assertStringContainsString('7.3', $resp->getBody()->getContents()); }); } @@ -345,7 +344,7 @@ public function testPrependFile() $this->assertEquals('200', $resp->getStatusCode(), 'ini_get.php status code'); $file = $resp->getBody()->getContents(); - $this->assertContains('prepend.php', $file); + $this->assertStringContainsString('prepend.php', $file); $query = http_build_query( ['f' => '/opt/php/lib/conf.d/extensions.ini'] diff --git a/testapps/builder_test/phpunit.xml.dist b/testapps/builder_test/phpunit.xml.dist index e8d391e1..4cf994b2 100644 --- a/testapps/builder_test/phpunit.xml.dist +++ b/testapps/builder_test/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/builder_test/tests/DockerfileTest.php b/testapps/builder_test/tests/DockerfileTest.php index 6d0c1f31..d0096f63 100644 --- a/testapps/builder_test/tests/DockerfileTest.php +++ b/testapps/builder_test/tests/DockerfileTest.php @@ -23,7 +23,7 @@ class DockerfileTest extends TestCase public function testDockerfile() { $dockerfile = file_get_contents('/workspace/Dockerfile'); - $this->assertNotFalse($dockerfile); - $this->assertContains("DOCUMENT_ROOT='/app/web'", $dockerfile); + $this->assertNotFalse(is_string($dockerfile)); + $this->assertNotFalse(str_contains($dockerfile, "DOCUMENT_ROOT='/app/web'")); } } diff --git a/testapps/integration-individual-packages/cloudbuild.yaml.in b/testapps/integration-individual-packages/cloudbuild.yaml.in index 05a87222..f5ceddf5 100644 --- a/testapps/integration-individual-packages/cloudbuild.yaml.in +++ b/testapps/integration-individual-packages/cloudbuild.yaml.in @@ -1,7 +1,7 @@ steps: - name: gcr.io/cloud-builders/docker args: ['build', '-t', '${IMAGE}', '.'] - - name: gcr.io/gcp-runtimes/structure_test + - name: gcr.io/gcp-runtimes/container-structure-test args: ['-i', '${IMAGE}', '--config', 'php_default.yaml', '-v'] - name: gcr.io/gcp-runtimes/integration_test args: ['-i', '${IMAGE}', '--no-monitoring', '--no-exception'] diff --git a/testapps/integration-individual-packages/composer.json b/testapps/integration-individual-packages/composer.json index 1ca4cdcd..254e5701 100644 --- a/testapps/integration-individual-packages/composer.json +++ b/testapps/integration-individual-packages/composer.json @@ -15,9 +15,9 @@ "require-dev": { "behat/mink": "^1.7", "behat/mink-goutte-driver": "^1.2", - "phpunit/phpunit": "~4.8.35", - "symfony/browser-kit": "^3.0", - "symfony/http-kernel": "^3.0", - "google/cloud-tools": "^0.6" + "phpunit/phpunit": "^9", + "symfony/browser-kit": "^5.0", + "symfony/http-kernel": "^5.0", + "google/cloud-tools": "^0.12" } } diff --git a/testapps/integration-individual-packages/test.yaml.in b/testapps/integration-individual-packages/test.yaml.in index 5c63be92..4f4cdb41 100644 --- a/testapps/integration-individual-packages/test.yaml.in +++ b/testapps/integration-individual-packages/test.yaml.in @@ -1,6 +1,6 @@ steps: - name: '${STAGING_BUILDER_IMAGE}' - args: ['--php74-image', 'gcr.io/google-appengine/php74:staging', '--php73-image', 'gcr.io/google-appengine/php73:staging', '--php72-image', 'gcr.io/google-appengine/php72:staging', '--php71-image', 'gcr.io/google-appengine/php71:staging'] + args: ['--php80-image', 'gcr.io/google-appengine/php80:staging', '--php74-image', 'gcr.io/google-appengine/php74:staging', '--php73-image', 'gcr.io/google-appengine/php73:staging'] - name: 'gcr.io/cloud-builders/docker:latest' args: ['build', '-t', '$_OUTPUT_IMAGE', '.'] images: diff --git a/testapps/integration/cloudbuild.yaml.in b/testapps/integration/cloudbuild.yaml.in index 05a87222..f5ceddf5 100644 --- a/testapps/integration/cloudbuild.yaml.in +++ b/testapps/integration/cloudbuild.yaml.in @@ -1,7 +1,7 @@ steps: - name: gcr.io/cloud-builders/docker args: ['build', '-t', '${IMAGE}', '.'] - - name: gcr.io/gcp-runtimes/structure_test + - name: gcr.io/gcp-runtimes/container-structure-test args: ['-i', '${IMAGE}', '--config', 'php_default.yaml', '-v'] - name: gcr.io/gcp-runtimes/integration_test args: ['-i', '${IMAGE}', '--no-monitoring', '--no-exception'] diff --git a/testapps/integration/composer.json b/testapps/integration/composer.json index 4af66d75..5d9b6c04 100644 --- a/testapps/integration/composer.json +++ b/testapps/integration/composer.json @@ -12,9 +12,9 @@ "require-dev": { "behat/mink": "^1.7", "behat/mink-goutte-driver": "^1.2", - "phpunit/phpunit": "~4.8.35", - "symfony/browser-kit": "^3.0", - "symfony/http-kernel": "^3.0", - "google/cloud-tools": "^0.6" + "phpunit/phpunit": "^9", + "symfony/browser-kit": "^5.0", + "symfony/http-kernel": "^5.0", + "google/cloud-tools": "^0.12" } } diff --git a/testapps/integration/test.yaml.in b/testapps/integration/test.yaml.in index 5c63be92..93e625bc 100644 --- a/testapps/integration/test.yaml.in +++ b/testapps/integration/test.yaml.in @@ -1,6 +1,6 @@ steps: - name: '${STAGING_BUILDER_IMAGE}' - args: ['--php74-image', 'gcr.io/google-appengine/php74:staging', '--php73-image', 'gcr.io/google-appengine/php73:staging', '--php72-image', 'gcr.io/google-appengine/php72:staging', '--php71-image', 'gcr.io/google-appengine/php71:staging'] + args: ['--php74-image', 'gcr.io/google-appengine/php74:staging', '--php73-image', 'gcr.io/google-appengine/php73:staging'] - name: 'gcr.io/cloud-builders/docker:latest' args: ['build', '-t', '$_OUTPUT_IMAGE', '.'] images: diff --git a/testapps/php73_custom/composer.json b/testapps/php73_custom/composer.json index 39f42938..cb87cf33 100644 --- a/testapps/php73_custom/composer.json +++ b/testapps/php73_custom/composer.json @@ -5,7 +5,6 @@ "ext-calendar": "*", "ext-exif": "*", "ext-ftp": "*", - "ext-gd": "*", "ext-gettext": "*", "ext-intl": "*", "ext-shmop": "*", diff --git a/testapps/php73_custom/php73.yaml b/testapps/php73_custom/php73.yaml index 178bd0b0..d3b673b0 100644 --- a/testapps/php73_custom/php73.yaml +++ b/testapps/php73_custom/php73.yaml @@ -1,5 +1,6 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "version" - command: ["/opt/php/bin/php", "-v"] + command: "/opt/php/bin/php" + args: ["-v"] expectedOutput: ["PHP 7\\.3.*"] diff --git a/testapps/php73_custom/tests/phpunit.xml.dist b/testapps/php73_custom/tests/phpunit.xml.dist index 8ded8984..b457e7a8 100644 --- a/testapps/php73_custom/tests/phpunit.xml.dist +++ b/testapps/php73_custom/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php73_custom/tests/tests/PHP73CustomTest.php b/testapps/php73_custom/tests/tests/PHP73CustomTest.php index d5e0d779..d5cc982c 100644 --- a/testapps/php73_custom/tests/tests/PHP73CustomTest.php +++ b/testapps/php73_custom/tests/tests/PHP73CustomTest.php @@ -70,7 +70,7 @@ class PHP7CustomTest extends TestCase 'calendar', 'exif', 'ftp', - 'gd', + // 'gd', 'gettext', 'intl', 'mbstring', @@ -87,13 +87,13 @@ class PHP7CustomTest extends TestCase 'imagick', ); - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // Wait for nginx to start sleep(3); } - public function setUp() + public function setUp(): void { $this->client = new Client(['base_uri' => 'http://php73-custom:8080/']); } @@ -103,7 +103,7 @@ public function testExtensions() $resp = $this->client->get('extensions.php'); $loaded = $resp->getBody()->getContents(); foreach (self::$extensions as $ext) { - $this->assertContains($ext, $loaded); + $this->assertStringContainsString($ext, $loaded); } } @@ -112,12 +112,12 @@ 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); + $this->assertStringContainsString('success storing in apc bc', $body); + $this->assertStringContainsString('success fetching from apc bc', $body); + $this->assertStringContainsString('success deleting from apc bc', $body); + $this->assertStringContainsString('success storing in apcu', $body); + $this->assertStringContainsString('success fetching from apcu', $body); + $this->assertStringContainsString('success deleting from apcu', $body); } public function testImagickCanLoad() @@ -126,7 +126,7 @@ public function testImagickCanLoad() $body = $resp->getBody()->getContents(); // test image should by 300px by 1px - $this->assertContains('300x1', $body); + $this->assertStringContainsString('300x1', $body); } public function testFrontControllerFileEnv() @@ -134,6 +134,6 @@ 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); + $this->assertStringContainsString('FRONT_CONTROLLER_FILE works', $body); } } diff --git a/testapps/php73_e2e/tests/composer.json b/testapps/php73_e2e/tests/composer.json index f83675f1..137ed877 100644 --- a/testapps/php73_e2e/tests/composer.json +++ b/testapps/php73_e2e/tests/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "google/cloud-tools": "~0.6", + "google/cloud-tools": "^0.12", "guzzlehttp/guzzle": "~6.0", - "symfony/browser-kit": "~2" + "symfony/browser-kit": "~5" } } diff --git a/testapps/php73_e2e/tests/phpunit.xml.dist b/testapps/php73_e2e/tests/phpunit.xml.dist index 8ded8984..44828586 100644 --- a/testapps/php73_e2e/tests/phpunit.xml.dist +++ b/testapps/php73_e2e/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php73_e2e/tests/tests/EndToEndTest.php b/testapps/php73_e2e/tests/tests/EndToEndTest.php index 2260dfa2..7a1a2098 100644 --- a/testapps/php73_e2e/tests/tests/EndToEndTest.php +++ b/testapps/php73_e2e/tests/tests/EndToEndTest.php @@ -32,7 +32,7 @@ class EndToEndTest extends TestCase const VERSION_ENV = 'TAG'; const SERVICE_ACCOUNT_ENV = 'SERVICE_ACCOUNT_JSON'; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $project_id = getenv(self::PROJECT_ENV); $e2e_test_version = getenv(self::VERSION_ENV); @@ -94,7 +94,7 @@ public static function deploy($project_id, $e2e_test_version) } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // TODO: check the return value and maybe retry? $cmd = sprintf( @@ -122,7 +122,7 @@ private static function execWithError($command, $errorPrefix) } } - public function setUp() + public function setUp(): void { $this->eventuallyConsistentRetryCount = 10; $this->catchAllExceptions = true; @@ -141,7 +141,7 @@ public function testIndex() $resp = $this->client->get('index.php'); $this->assertEquals('200', $resp->getStatusCode(), 'index.php status code'); - $this->assertContains('Hello World', $resp->getBody()->getContents()); + $this->assertStringContainsString('Hello World', $resp->getBody()->getContents()); }); } @@ -152,7 +152,7 @@ public function testHttpsEnv() $resp = $this->client->get('https-env.php'); $this->assertEquals('200', $resp->getStatusCode(), 'https-env.php status code'); - $this->assertContains('HTTPS: on', $resp->getBody()->getContents()); + $this->assertStringContainsString('HTTPS: on', $resp->getBody()->getContents()); }); } @@ -164,7 +164,7 @@ public function testGoodbye() $resp = $this->client->get('/goodbye'); $this->assertEquals('200', $resp->getStatusCode(), '/goodbye status code'); - $this->assertContains('Goodbye World', + $this->assertStringContainsString('Goodbye World', $resp->getBody()->getContents()); }); } @@ -191,7 +191,7 @@ public function testExec() $resp->getStatusCode(), 'exec.php status code' ); - $this->assertContains( + $this->assertStringContainsString( 'exec succeeded.', $resp->getBody()->getContents() ); @@ -205,7 +205,7 @@ public function testPdoSqlite() $resp = $this->client->get('pdo_sqlite.php'); $this->assertEquals('200', $resp->getStatusCode(), 'pdo_sqlite.php status code'); - $this->assertContains('Hello pdo_sqlite', + $this->assertStringContainsString('Hello pdo_sqlite', $resp->getBody()->getContents()); }); } @@ -217,7 +217,7 @@ public function testSessionSaveHandler() $resp = $this->client->get('session_save_handler.php'); $this->assertEquals('200', $resp->getStatusCode(), 'session_save_handler status code'); - $this->assertContains('memcached', + $this->assertStringContainsString('memcached', $resp->getBody()->getContents()); }); } diff --git a/testapps/php73_extensions/composer.json b/testapps/php73_extensions/composer.json index e80d6a41..e5c9c8c2 100644 --- a/testapps/php73_extensions/composer.json +++ b/testapps/php73_extensions/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "7.3.*", - "phpunit/phpunit": "^4.8.35", + "phpunit/phpunit": "^9.5", "ext-amqp": "*", "ext-bcmath": "*", "ext-calendar": "*", diff --git a/testapps/php73_extensions/phpunit.xml.dist b/testapps/php73_extensions/phpunit.xml.dist index 8ded8984..ad34c648 100644 --- a/testapps/php73_extensions/phpunit.xml.dist +++ b/testapps/php73_extensions/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php73_extensions/tests/GdTest.php b/testapps/php73_extensions/tests/GdTest.php index c663b508..400655dc 100644 --- a/testapps/php73_extensions/tests/GdTest.php +++ b/testapps/php73_extensions/tests/GdTest.php @@ -18,9 +18,13 @@ class GdTest extends TestCase { - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('gd')); + if (!extension_loaded('gd')) { + $this->markTestSkipped( + 'The gd extension is not available.' + ); + } } public function testFreetypeSupport() diff --git a/testapps/php73_extensions/tests/GmpTest.php b/testapps/php73_extensions/tests/GmpTest.php index ed7e0821..6ffe0731 100644 --- a/testapps/php73_extensions/tests/GmpTest.php +++ b/testapps/php73_extensions/tests/GmpTest.php @@ -18,9 +18,13 @@ class GmpTest extends TestCase { - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('gmp')); + if (!extension_loaded('gmp')) { + $this->markTestSkipped( + 'The gmp extension is not available.' + ); + } } public function testGcd() diff --git a/testapps/php73_extensions/tests/ImagickTest.php b/testapps/php73_extensions/tests/ImagickTest.php index 4670b141..edd4c6b4 100644 --- a/testapps/php73_extensions/tests/ImagickTest.php +++ b/testapps/php73_extensions/tests/ImagickTest.php @@ -20,9 +20,13 @@ class ImagickTest extends TestCase { private $success = false; - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('imagick')); + if (!extension_loaded('imagick')) { + $this->markTestSkipped( + 'The imagick extension is not available.' + ); + } } public function testLoadImage() diff --git a/testapps/php73_extensions/tests/OauthTest.php b/testapps/php73_extensions/tests/OauthTest.php index f0fa2572..1ff97c27 100644 --- a/testapps/php73_extensions/tests/OauthTest.php +++ b/testapps/php73_extensions/tests/OauthTest.php @@ -20,6 +20,15 @@ class OauthTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('oauth')) { + $this->markTestSkipped( + 'The oauth extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('oauth')); diff --git a/testapps/php73_extensions/tests/PhalconTest.php b/testapps/php73_extensions/tests/PhalconTest.php index 84ed26d1..b4598c9b 100644 --- a/testapps/php73_extensions/tests/PhalconTest.php +++ b/testapps/php73_extensions/tests/PhalconTest.php @@ -20,9 +20,17 @@ class PhalconTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('phalcon')) { + $this->markTestSkipped( + 'The phalcon extension is not available.' + ); + } + } + public function testExtensionLoaded() { - $this->markTestSkipped('Phalcon is not available for PHP 7.1 yet.'); - // $this->assertTrue(extension_loaded('phalcon')); + $this->assertTrue(extension_loaded('phalcon')); } } diff --git a/testapps/php73_extensions/tests/ProtobufTest.php b/testapps/php73_extensions/tests/ProtobufTest.php index 0d9606e5..752f7908 100644 --- a/testapps/php73_extensions/tests/ProtobufTest.php +++ b/testapps/php73_extensions/tests/ProtobufTest.php @@ -20,6 +20,15 @@ class ProtobufTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('protobuf')) { + $this->markTestSkipped( + 'The Protobuf extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('protobuf')); diff --git a/testapps/php73_extensions/tests/RdkafkaTest.php b/testapps/php73_extensions/tests/RdkafkaTest.php index 2e522a4e..3ad07f67 100644 --- a/testapps/php73_extensions/tests/RdkafkaTest.php +++ b/testapps/php73_extensions/tests/RdkafkaTest.php @@ -20,6 +20,15 @@ class RdkafkaTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('rdkafka')) { + $this->markTestSkipped( + 'The rdkafka extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('rdkafka')); diff --git a/testapps/php73_extensions_legacy/composer.json b/testapps/php73_extensions_legacy/composer.json index c61224ef..714aadb3 100644 --- a/testapps/php73_extensions_legacy/composer.json +++ b/testapps/php73_extensions_legacy/composer.json @@ -1,7 +1,7 @@ { "require": { - "php": "7.2.*", - "phpunit/phpunit": "^4.8.35", + "php": "7.3.*", + "phpunit/phpunit": "^9.5", "ext-amqp": "*", "ext-bcmath": "*", "ext-calendar": "*", diff --git a/testapps/php73_extensions_legacy/php.ini b/testapps/php73_extensions_legacy/php.ini index 188e7335..d82d2650 100644 --- a/testapps/php73_extensions_legacy/php.ini +++ b/testapps/php73_extensions_legacy/php.ini @@ -6,6 +6,7 @@ extension=imagick.so extension=mongodb.so extension=oauth.so extension=opencensus.so +extension=raphf.so extension=pq.so extension=protobuf.so extension=rdkafka.so diff --git a/testapps/php73_extensions_legacy/phpunit.xml.dist b/testapps/php73_extensions_legacy/phpunit.xml.dist index 8ded8984..37eba96e 100644 --- a/testapps/php73_extensions_legacy/phpunit.xml.dist +++ b/testapps/php73_extensions_legacy/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php73_extensions_legacy/tests/EvTest.php b/testapps/php73_extensions_legacy/tests/EvTest.php index cd556d33..b84b5ca1 100644 --- a/testapps/php73_extensions_legacy/tests/EvTest.php +++ b/testapps/php73_extensions_legacy/tests/EvTest.php @@ -20,9 +20,13 @@ class EvTest extends TestCase { private $success = false; - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('ev')); + if (!extension_loaded('ev')) { + $this->markTestSkipped( + 'The ev extension is not available.' + ); + } } public function testTimer() diff --git a/testapps/php73_extensions_legacy/tests/EventTest.php b/testapps/php73_extensions_legacy/tests/EventTest.php index 1fe6535f..d7fd0aa3 100644 --- a/testapps/php73_extensions_legacy/tests/EventTest.php +++ b/testapps/php73_extensions_legacy/tests/EventTest.php @@ -20,6 +20,15 @@ class EventTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('event')) { + $this->markTestSkipped( + 'The event extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('event')); diff --git a/testapps/php73_extensions_legacy/tests/GdTest.php b/testapps/php73_extensions_legacy/tests/GdTest.php index c663b508..400655dc 100644 --- a/testapps/php73_extensions_legacy/tests/GdTest.php +++ b/testapps/php73_extensions_legacy/tests/GdTest.php @@ -18,9 +18,13 @@ class GdTest extends TestCase { - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('gd')); + if (!extension_loaded('gd')) { + $this->markTestSkipped( + 'The gd extension is not available.' + ); + } } public function testFreetypeSupport() diff --git a/testapps/php73_extensions_legacy/tests/GmpTest.php b/testapps/php73_extensions_legacy/tests/GmpTest.php index ed7e0821..6ffe0731 100644 --- a/testapps/php73_extensions_legacy/tests/GmpTest.php +++ b/testapps/php73_extensions_legacy/tests/GmpTest.php @@ -18,9 +18,13 @@ class GmpTest extends TestCase { - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('gmp')); + if (!extension_loaded('gmp')) { + $this->markTestSkipped( + 'The gmp extension is not available.' + ); + } } public function testGcd() diff --git a/testapps/php73_extensions_legacy/tests/ImagickTest.php b/testapps/php73_extensions_legacy/tests/ImagickTest.php index 4670b141..edd4c6b4 100644 --- a/testapps/php73_extensions_legacy/tests/ImagickTest.php +++ b/testapps/php73_extensions_legacy/tests/ImagickTest.php @@ -20,9 +20,13 @@ class ImagickTest extends TestCase { private $success = false; - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('imagick')); + if (!extension_loaded('imagick')) { + $this->markTestSkipped( + 'The imagick extension is not available.' + ); + } } public function testLoadImage() diff --git a/testapps/php73_extensions_legacy/tests/LibSodiumTest.php b/testapps/php73_extensions_legacy/tests/LibSodiumTest.php index 9f2ac230..470c549a 100644 --- a/testapps/php73_extensions_legacy/tests/LibSodiumTest.php +++ b/testapps/php73_extensions_legacy/tests/LibSodiumTest.php @@ -18,9 +18,13 @@ class LibsodiumTest extends TestCase { - public function testExtensionLoaded() + protected function setUp(): void { - $this->assertTrue(extension_loaded('sodium')); + if (!extension_loaded('sodium')) { + $this->markTestSkipped( + 'The Sodium extension is not available.' + ); + } } public function testLoadImage() diff --git a/testapps/php73_extensions_legacy/tests/OauthTest.php b/testapps/php73_extensions_legacy/tests/OauthTest.php index f0fa2572..1ff97c27 100644 --- a/testapps/php73_extensions_legacy/tests/OauthTest.php +++ b/testapps/php73_extensions_legacy/tests/OauthTest.php @@ -20,6 +20,15 @@ class OauthTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('oauth')) { + $this->markTestSkipped( + 'The oauth extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('oauth')); diff --git a/testapps/php73_extensions_legacy/tests/PhalconTest.php b/testapps/php73_extensions_legacy/tests/PhalconTest.php index 84ed26d1..b4598c9b 100644 --- a/testapps/php73_extensions_legacy/tests/PhalconTest.php +++ b/testapps/php73_extensions_legacy/tests/PhalconTest.php @@ -20,9 +20,17 @@ class PhalconTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('phalcon')) { + $this->markTestSkipped( + 'The phalcon extension is not available.' + ); + } + } + public function testExtensionLoaded() { - $this->markTestSkipped('Phalcon is not available for PHP 7.1 yet.'); - // $this->assertTrue(extension_loaded('phalcon')); + $this->assertTrue(extension_loaded('phalcon')); } } diff --git a/testapps/php73_extensions_legacy/tests/ProtobufTest.php b/testapps/php73_extensions_legacy/tests/ProtobufTest.php index 0d9606e5..752f7908 100644 --- a/testapps/php73_extensions_legacy/tests/ProtobufTest.php +++ b/testapps/php73_extensions_legacy/tests/ProtobufTest.php @@ -20,6 +20,15 @@ class ProtobufTest extends TestCase { private $success = false; + protected function setUp(): void + { + if (!extension_loaded('protobuf')) { + $this->markTestSkipped( + 'The Protobuf extension is not available.' + ); + } + } + public function testExtensionLoaded() { $this->assertTrue(extension_loaded('protobuf')); diff --git a/testapps/php74_custom/php74.yaml b/testapps/php74_custom/php74.yaml index f71ecd8a..f2222b93 100644 --- a/testapps/php74_custom/php74.yaml +++ b/testapps/php74_custom/php74.yaml @@ -1,5 +1,6 @@ -schemaVersion: "1.0.0" +schemaVersion: "2.0.0" commandTests: - name: "version" - command: ["/opt/php/bin/php", "-v"] + command: "/opt/php/bin/php" + args: ["-v"] expectedOutput: ["PHP 7\\.4.*"] diff --git a/testapps/php74_custom/tests/phpunit.xml.dist b/testapps/php74_custom/tests/phpunit.xml.dist index 8ded8984..743a8c81 100644 --- a/testapps/php74_custom/tests/phpunit.xml.dist +++ b/testapps/php74_custom/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php74_custom/tests/tests/PHP74CustomTest.php b/testapps/php74_custom/tests/tests/PHP74CustomTest.php index bc5e9431..2b1b6f05 100644 --- a/testapps/php74_custom/tests/tests/PHP74CustomTest.php +++ b/testapps/php74_custom/tests/tests/PHP74CustomTest.php @@ -52,7 +52,6 @@ class PHP7CustomTest extends TestCase 'Phar', 'posix', 'readline', - 'recode', 'Reflection', 'mysqlnd', 'SimpleXML', @@ -87,13 +86,13 @@ class PHP7CustomTest extends TestCase 'imagick', ); - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // Wait for nginx to start sleep(3); } - public function setUp() + public function setUp(): void { $this->client = new Client(['base_uri' => 'http://php74-custom:8080/']); } @@ -103,7 +102,7 @@ public function testExtensions() $resp = $this->client->get('extensions.php'); $loaded = $resp->getBody()->getContents(); foreach (self::$extensions as $ext) { - $this->assertContains($ext, $loaded); + $this->assertStringContainsString($ext, $loaded); } } @@ -112,12 +111,12 @@ 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); + $this->assertStringContainsString('success storing in apc bc', $body); + $this->assertStringContainsString('success fetching from apc bc', $body); + $this->assertStringContainsString('success deleting from apc bc', $body); + $this->assertStringContainsString('success storing in apcu', $body); + $this->assertStringContainsString('success fetching from apcu', $body); + $this->assertStringContainsString('success deleting from apcu', $body); } public function testImagickCanLoad() @@ -126,7 +125,7 @@ public function testImagickCanLoad() $body = $resp->getBody()->getContents(); // test image should by 300px by 1px - $this->assertContains('300x1', $body); + $this->assertStringContainsString('300x1', $body); } public function testFrontControllerFileEnv() @@ -134,6 +133,6 @@ 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); + $this->assertStringContainsString('FRONT_CONTROLLER_FILE works', $body); } } diff --git a/testapps/php74_e2e/tests/composer.json b/testapps/php74_e2e/tests/composer.json index f83675f1..137ed877 100644 --- a/testapps/php74_e2e/tests/composer.json +++ b/testapps/php74_e2e/tests/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "google/cloud-tools": "~0.6", + "google/cloud-tools": "^0.12", "guzzlehttp/guzzle": "~6.0", - "symfony/browser-kit": "~2" + "symfony/browser-kit": "~5" } } diff --git a/testapps/php74_e2e/tests/phpunit.xml.dist b/testapps/php74_e2e/tests/phpunit.xml.dist index 8ded8984..56ba5f27 100644 --- a/testapps/php74_e2e/tests/phpunit.xml.dist +++ b/testapps/php74_e2e/tests/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php74_e2e/tests/tests/EndToEndTest.php b/testapps/php74_e2e/tests/tests/EndToEndTest.php index 2260dfa2..7a1a2098 100644 --- a/testapps/php74_e2e/tests/tests/EndToEndTest.php +++ b/testapps/php74_e2e/tests/tests/EndToEndTest.php @@ -32,7 +32,7 @@ class EndToEndTest extends TestCase const VERSION_ENV = 'TAG'; const SERVICE_ACCOUNT_ENV = 'SERVICE_ACCOUNT_JSON'; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $project_id = getenv(self::PROJECT_ENV); $e2e_test_version = getenv(self::VERSION_ENV); @@ -94,7 +94,7 @@ public static function deploy($project_id, $e2e_test_version) } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // TODO: check the return value and maybe retry? $cmd = sprintf( @@ -122,7 +122,7 @@ private static function execWithError($command, $errorPrefix) } } - public function setUp() + public function setUp(): void { $this->eventuallyConsistentRetryCount = 10; $this->catchAllExceptions = true; @@ -141,7 +141,7 @@ public function testIndex() $resp = $this->client->get('index.php'); $this->assertEquals('200', $resp->getStatusCode(), 'index.php status code'); - $this->assertContains('Hello World', $resp->getBody()->getContents()); + $this->assertStringContainsString('Hello World', $resp->getBody()->getContents()); }); } @@ -152,7 +152,7 @@ public function testHttpsEnv() $resp = $this->client->get('https-env.php'); $this->assertEquals('200', $resp->getStatusCode(), 'https-env.php status code'); - $this->assertContains('HTTPS: on', $resp->getBody()->getContents()); + $this->assertStringContainsString('HTTPS: on', $resp->getBody()->getContents()); }); } @@ -164,7 +164,7 @@ public function testGoodbye() $resp = $this->client->get('/goodbye'); $this->assertEquals('200', $resp->getStatusCode(), '/goodbye status code'); - $this->assertContains('Goodbye World', + $this->assertStringContainsString('Goodbye World', $resp->getBody()->getContents()); }); } @@ -191,7 +191,7 @@ public function testExec() $resp->getStatusCode(), 'exec.php status code' ); - $this->assertContains( + $this->assertStringContainsString( 'exec succeeded.', $resp->getBody()->getContents() ); @@ -205,7 +205,7 @@ public function testPdoSqlite() $resp = $this->client->get('pdo_sqlite.php'); $this->assertEquals('200', $resp->getStatusCode(), 'pdo_sqlite.php status code'); - $this->assertContains('Hello pdo_sqlite', + $this->assertStringContainsString('Hello pdo_sqlite', $resp->getBody()->getContents()); }); } @@ -217,7 +217,7 @@ public function testSessionSaveHandler() $resp = $this->client->get('session_save_handler.php'); $this->assertEquals('200', $resp->getStatusCode(), 'session_save_handler status code'); - $this->assertContains('memcached', + $this->assertStringContainsString('memcached', $resp->getBody()->getContents()); }); } diff --git a/testapps/php74_extensions/composer.json b/testapps/php74_extensions/composer.json index 1066c2f8..01313779 100644 --- a/testapps/php74_extensions/composer.json +++ b/testapps/php74_extensions/composer.json @@ -1,8 +1,7 @@ { "require": { "php": "7.4.*", - "phpunit/phpunit": "^4.8.35", - "ext-amqp": "*", + "phpunit/phpunit": "^9.5", "ext-bcmath": "*", "ext-calendar": "*", "ext-couchbase": "*", diff --git a/testapps/php74_extensions/phpunit.xml.dist b/testapps/php74_extensions/phpunit.xml.dist index 8ded8984..3e97ba79 100644 --- a/testapps/php74_extensions/phpunit.xml.dist +++ b/testapps/php74_extensions/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php74_extensions/tests/ExtensionsLoadedTest.php b/testapps/php74_extensions/tests/ExtensionsLoadedTest.php index 6bf2f3f4..fa843c1c 100644 --- a/testapps/php74_extensions/tests/ExtensionsLoadedTest.php +++ b/testapps/php74_extensions/tests/ExtensionsLoadedTest.php @@ -29,7 +29,7 @@ public function testExtensionLoaded($extensionName) public function extensions() { return [ - ['amqp'], + // ['amqp'], ['bitset'], ['couchbase'], ['ds'], diff --git a/testapps/php74_extensions_legacy/composer.json b/testapps/php74_extensions_legacy/composer.json index 6040f7f5..22b21540 100644 --- a/testapps/php74_extensions_legacy/composer.json +++ b/testapps/php74_extensions_legacy/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "7.4.*", - "phpunit/phpunit": "^4.8.35", + "phpunit/phpunit": "^9.5", "ext-amqp": "*", "ext-bcmath": "*", "ext-calendar": "*", diff --git a/testapps/php74_extensions_legacy/php.ini b/testapps/php74_extensions_legacy/php.ini index 188e7335..d82d2650 100644 --- a/testapps/php74_extensions_legacy/php.ini +++ b/testapps/php74_extensions_legacy/php.ini @@ -6,6 +6,7 @@ extension=imagick.so extension=mongodb.so extension=oauth.so extension=opencensus.so +extension=raphf.so extension=pq.so extension=protobuf.so extension=rdkafka.so diff --git a/testapps/php74_extensions_legacy/phpunit.xml.dist b/testapps/php74_extensions_legacy/phpunit.xml.dist index 8ded8984..a70a6f2f 100644 --- a/testapps/php74_extensions_legacy/phpunit.xml.dist +++ b/testapps/php74_extensions_legacy/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests diff --git a/testapps/php74_extensions_legacy/tests/ExtensionsLoadedTest.php b/testapps/php74_extensions_legacy/tests/ExtensionsLoadedTest.php index 6bf2f3f4..fa843c1c 100644 --- a/testapps/php74_extensions_legacy/tests/ExtensionsLoadedTest.php +++ b/testapps/php74_extensions_legacy/tests/ExtensionsLoadedTest.php @@ -29,7 +29,7 @@ public function testExtensionLoaded($extensionName) public function extensions() { return [ - ['amqp'], + // ['amqp'], ['bitset'], ['couchbase'], ['ds'], diff --git a/testapps/php80_custom/.gitignore b/testapps/php80_custom/.gitignore new file mode 100644 index 00000000..09a29da8 --- /dev/null +++ b/testapps/php80_custom/.gitignore @@ -0,0 +1,2 @@ +cloudbuild.yaml +Dockerfile diff --git a/testapps/php80_custom/Dockerfile.in b/testapps/php80_custom/Dockerfile.in new file mode 100644 index 00000000..2b1ce1c8 --- /dev/null +++ b/testapps/php80_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/php80_custom/composer.json b/testapps/php80_custom/composer.json new file mode 100644 index 00000000..d0ce75eb --- /dev/null +++ b/testapps/php80_custom/composer.json @@ -0,0 +1,23 @@ +{ + "require": { + "php": "8.0.*", + "ext-apcu": "*", + "ext-bcmath": "*", + "ext-calendar": "*", + "ext-exif": "*", + "ext-ftp": "*", + "ext-gd": "*", + "ext-gettext": "*", + "ext-intl": "*", + "ext-shmop": "*", + "ext-soap": "*", + "ext-sqlite3": "*", + "ext-pdo_sqlite": "*", + "ext-xmlrpc": "*", + "ext-xsl": "*", + "ext-mongodb": "*", + "ext-redis": "*", + "ext-imagick": "*", + "silex/silex": "^1.3" + } +} diff --git a/testapps/php80_custom/php80.yaml b/testapps/php80_custom/php80.yaml new file mode 100644 index 00000000..337aaed1 --- /dev/null +++ b/testapps/php80_custom/php80.yaml @@ -0,0 +1,9 @@ +schemaVersion: "2.0.0" +commandTests: + - name: "version" + command: "/opt/php/bin/php" + args: ["-v"] + expectedOutput: ["PHP 8\\.0.*"] +# licenseTests: +# - debian: true +# files: [] \ No newline at end of file diff --git a/testapps/php80_custom/tests/composer.json b/testapps/php80_custom/tests/composer.json new file mode 100644 index 00000000..e4cb56d4 --- /dev/null +++ b/testapps/php80_custom/tests/composer.json @@ -0,0 +1,6 @@ +{ + "require-dev": { + "guzzlehttp/guzzle": "~6.0", + "symfony/browser-kit": "~5" + } +} diff --git a/testapps/php80_custom/tests/composer.lock b/testapps/php80_custom/tests/composer.lock new file mode 100644 index 00000000..aba2f40d --- /dev/null +++ b/testapps/php80_custom/tests/composer.lock @@ -0,0 +1,951 @@ +{ + "_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#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e21d7aeb7f9354ede499636bebe131bd", + "packages": [], + "packages-dev": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.5", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "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 is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, + "time": "2020-06-16T21:01:06+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-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" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.2" + }, + "time": "2021-04-26T09:17:50+00:00" + }, + { + "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" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/browser-kit", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "b1c9d5701273a255da3a580f85066b83bd94e97d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b1c9d5701273a255da3a580f85066b83bd94e97d", + "reference": "b1c9d5701273a255da3a580f85066b83bd94e97d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/dom-crawler": "^4.4|^5.0" + }, + "require-dev": { + "symfony/css-selector": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "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": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v5.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-08T10:27:02+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "400e265163f65aceee7e904ef532e15228de674b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/400e265163f65aceee7e904ef532e15228de674b", + "reference": "400e265163f65aceee7e904ef532e15228de674b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "masterminds/html5": "<2.6" + }, + "require-dev": { + "masterminds/html5": "^2.6", + "symfony/css-selector": "^4.4|^5.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "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": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-15T18:55:04+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "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 backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/testapps/php80_custom/tests/phpunit.xml.dist b/testapps/php80_custom/tests/phpunit.xml.dist new file mode 100644 index 00000000..461c919d --- /dev/null +++ b/testapps/php80_custom/tests/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + tests + + + diff --git a/testapps/php80_custom/tests/tests/PHP80CustomTest.php b/testapps/php80_custom/tests/tests/PHP80CustomTest.php new file mode 100644 index 00000000..906968d7 --- /dev/null +++ b/testapps/php80_custom/tests/tests/PHP80CustomTest.php @@ -0,0 +1,134 @@ +client = new Client(['base_uri' => 'http://php80-custom:8080/']); + } + + public function testExtensions() + { + $resp = $this->client->get('extensions.php'); + $loaded = $resp->getBody()->getContents(); + foreach (self::$extensions as $ext) { + $this->assertStringContainsString($ext, $loaded); + } + } + + public function testApcIsAbleToExecuteCommonOperations() + { + $resp = $this->client->get('apc.php'); + $body = $resp->getBody()->getContents(); + + $this->assertStringContainsString('success storing in apcu', $body); + $this->assertStringContainsString('success fetching from apcu', $body); + $this->assertStringContainsString('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->assertStringContainsString('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->assertStringContainsString('FRONT_CONTROLLER_FILE works', $body); + } +} diff --git a/testapps/php80_custom/tests/tests/bootstrap.php b/testapps/php80_custom/tests/tests/bootstrap.php new file mode 100644 index 00000000..864f1cd1 --- /dev/null +++ b/testapps/php80_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/php80_custom/web/imagick.php b/testapps/php80_custom/web/imagick.php new file mode 100644 index 00000000..59ed28fb --- /dev/null +++ b/testapps/php80_custom/web/imagick.php @@ -0,0 +1,21 @@ +getImageGeometry(); +echo $dimensions['width'] . 'x' . $dimensions['height']; diff --git a/testapps/php80_custom/web/parse_str.php b/testapps/php80_custom/web/parse_str.php new file mode 100644 index 00000000..978b35d1 --- /dev/null +++ b/testapps/php80_custom/web/parse_str.php @@ -0,0 +1,23 @@ + + + + + tests + + + diff --git a/testapps/php80_e2e/tests/tests/EndToEndTest.php b/testapps/php80_e2e/tests/tests/EndToEndTest.php new file mode 100644 index 00000000..7a1a2098 --- /dev/null +++ b/testapps/php80_e2e/tests/tests/EndToEndTest.php @@ -0,0 +1,250 @@ +eventuallyConsistentRetryCount = 10; + $this->catchAllExceptions = true; + + $url = sprintf('https://%s-dot-%s.appspot.com/', + getenv(self::VERSION_ENV), + getenv(self::PROJECT_ENV)); + $this->client = new Client(['base_uri' => $url]); + } + + public function testIndex() + { + $this->runEventuallyConsistentTest(function () { + // Index serves succesfully with 'Hello World'. + // This works because the custom DOCUMENT_ROOT is working. + $resp = $this->client->get('index.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'index.php status code'); + $this->assertStringContainsString('Hello World', $resp->getBody()->getContents()); + }); + } + + public function testHttpsEnv() + { + $this->runEventuallyConsistentTest(function () { + // Check the HTTPS envvar on the server + $resp = $this->client->get('https-env.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'https-env.php status code'); + $this->assertStringContainsString('HTTPS: on', $resp->getBody()->getContents()); + }); + } + + public function testGoodbye() + { + $this->runEventuallyConsistentTest(function () { + // The URL '/goodbye' works with 'Goodbye World'. + // This works because the nginx-app.conf is effective. + $resp = $this->client->get('/goodbye'); + $this->assertEquals('200', $resp->getStatusCode(), + '/goodbye status code'); + $this->assertStringContainsString('Goodbye World', + $resp->getBody()->getContents()); + }); + } + + public function testPhpInfo() + { + $this->runEventuallyConsistentTest(function () { + // Access to phpinfo.php, while phpinfo() should be enabled this time. + $resp = $this->client->get('phpinfo.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'phpinfo.php status code'); + $this->assertTrue(strlen($resp->getBody()->getContents()) > 1000, + 'phpinfo() should be enabled.'); + }); + } + + public function testExec() + { + $this->runEventuallyConsistentTest(function () { + // Access to exec.php; exec() should be enabled. + $resp = $this->client->get('exec.php'); + $this->assertEquals( + '200', + $resp->getStatusCode(), + 'exec.php status code' + ); + $this->assertStringContainsString( + 'exec succeeded.', + $resp->getBody()->getContents() + ); + }); + } + + public function testPdoSqlite() + { + $this->runEventuallyConsistentTest(function () { + // Access to pdo_sqlite.php, which should work. + $resp = $this->client->get('pdo_sqlite.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'pdo_sqlite.php status code'); + $this->assertStringContainsString('Hello pdo_sqlite', + $resp->getBody()->getContents()); + }); + } + + public function testSessionSaveHandler() + { + $this->markTestSkipped('Memcache is not available on env:flex.'); + $this->runEventuallyConsistentTest(function () { + $resp = $this->client->get('session_save_handler.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'session_save_handler status code'); + $this->assertStringContainsString('memcached', + $resp->getBody()->getContents()); + }); + } + + public function testSession() + { + $this->markTestSkipped('Memcache is not available on env:flex.'); + $this->runEventuallyConsistentTest(function () { + $jar = new CookieJar(); + $resp = $this->client->get('session.php', ['cookies' => $jar]); + $this->assertEquals('200', $resp->getStatusCode(), + 'session.php status code'); + $this->assertEquals('0', $body = $resp->getBody()->getContents()); + + $resp = $this->client->get('session.php', ['cookies' => $jar]); + $this->assertEquals('200', $resp->getStatusCode(), + 'session.php status code'); + $this->assertEquals('1', $body = $resp->getBody()->getContents()); + }); + } + + public function testGrpcPubsub() + { + $this->runEventuallyConsistentTest(function () { + $resp = $this->client->get('grpc_pubsub.php'); + $this->assertEquals('200', $resp->getStatusCode(), + 'grpc_pubsub.php status code'); + }); + } +} diff --git a/testapps/php80_e2e/tests/tests/bootstrap.php b/testapps/php80_e2e/tests/tests/bootstrap.php new file mode 100644 index 00000000..823a5ebe --- /dev/null +++ b/testapps/php80_e2e/tests/tests/bootstrap.php @@ -0,0 +1,18 @@ + 'grpc']); + +foreach ($client->topics() as $topic) { + echo $topic->name() . '
'; +} diff --git a/testapps/php80_e2e/web/https-env.php b/testapps/php80_e2e/web/https-env.php new file mode 100644 index 00000000..fb430257 --- /dev/null +++ b/testapps/php80_e2e/web/https-env.php @@ -0,0 +1,19 @@ +get('/', function () { + return 'Hello World'; +}); + +$app->get('/goodbye', function () { + return 'Goodbye World'; +}); + +$app->run(); diff --git a/testapps/php80_e2e/web/pdo_sqlite.php b/testapps/php80_e2e/web/pdo_sqlite.php new file mode 100644 index 00000000..5b800090 --- /dev/null +++ b/testapps/php80_e2e/web/pdo_sqlite.php @@ -0,0 +1,19 @@ + + + + + tests + + + diff --git a/testapps/php80_extensions/tests/Blank300.png b/testapps/php80_extensions/tests/Blank300.png new file mode 100644 index 0000000000000000000000000000000000000000..e96fe466c1a8cd40d54a80844880b78f7137bf04 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!89CU1WQxUPO(4aV|H(?D8gCb z5n0T@z%2~Ij105pNB{-dOFVsD*{^c5h_NtFjy?r4K(@p+qQp5rH#aq}gu%HeHL)Z$ zMWH;iBts!2BUQoO(>LIKifSHEp_r$OV@SoVassertTrue(extension_loaded('ev')); + } + + public function testTimer() + { + // after 5ms, update success + $w1 = new EvTimer(0.005, 0, function () { + $this->success = true; + }); + Ev::run(); + + // sleep 10ms + usleep(10000); + + Ev::stop(); + + $this->assertTrue($this->success); + } +} diff --git a/testapps/php80_extensions/tests/EventTest.php b/testapps/php80_extensions/tests/EventTest.php new file mode 100644 index 00000000..1fe6535f --- /dev/null +++ b/testapps/php80_extensions/tests/EventTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('event')); + } +} diff --git a/testapps/php80_extensions/tests/ExtensionsLoadedTest.php b/testapps/php80_extensions/tests/ExtensionsLoadedTest.php new file mode 100644 index 00000000..9cde108a --- /dev/null +++ b/testapps/php80_extensions/tests/ExtensionsLoadedTest.php @@ -0,0 +1,53 @@ +assertTrue(extension_loaded($extensionName)); + } + + public function extensions() + { + return [ + ['amqp'], + ['bitset'], + ['couchbase'], + ['ds'], + ['eio'], + ['igbinary'], + ['krb5'], + ['lzf'], + ['memprof'], + ['opencensus'], + ['seaslog'], + // ['stackdriver_debugger'], + ['stomp'], + ['sync'], + ['timezonedb'], + ['vips'], + ['yaconf'], + ['yaf'], + ['yaml'] + ]; + } +} diff --git a/testapps/php80_extensions/tests/GdTest.php b/testapps/php80_extensions/tests/GdTest.php new file mode 100644 index 00000000..400655dc --- /dev/null +++ b/testapps/php80_extensions/tests/GdTest.php @@ -0,0 +1,37 @@ +markTestSkipped( + 'The gd extension is not available.' + ); + } + } + + public function testFreetypeSupport() + { + $this->assertTrue( + gd_info()['FreeType Support'], + 'GD should support Freetype' + ); + } +} diff --git a/testapps/php80_extensions/tests/GmpTest.php b/testapps/php80_extensions/tests/GmpTest.php new file mode 100644 index 00000000..ed7e0821 --- /dev/null +++ b/testapps/php80_extensions/tests/GmpTest.php @@ -0,0 +1,34 @@ +assertTrue(extension_loaded('gmp')); + } + + public function testGcd() + { + // basic test for greatest common denominator to see if gmp works + $this->assertEquals( + 3, + gmp_intval(gmp_gcd("12", "21")) + ); + } +} diff --git a/testapps/php80_extensions/tests/ImagickTest.php b/testapps/php80_extensions/tests/ImagickTest.php new file mode 100644 index 00000000..4670b141 --- /dev/null +++ b/testapps/php80_extensions/tests/ImagickTest.php @@ -0,0 +1,35 @@ +assertTrue(extension_loaded('imagick')); + } + + public function testLoadImage() + { + $image = new Imagick(__DIR__ . '/Blank300.png'); + $dimensions = $image->getImageGeometry(); + $this->assertEquals(300, $dimensions['width']); + $this->assertEquals(1, $dimensions['height']); + } +} diff --git a/testapps/php80_extensions/tests/OauthTest.php b/testapps/php80_extensions/tests/OauthTest.php new file mode 100644 index 00000000..f0fa2572 --- /dev/null +++ b/testapps/php80_extensions/tests/OauthTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('oauth')); + } +} diff --git a/testapps/php80_extensions/tests/ProtobufTest.php b/testapps/php80_extensions/tests/ProtobufTest.php new file mode 100644 index 00000000..0d9606e5 --- /dev/null +++ b/testapps/php80_extensions/tests/ProtobufTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('protobuf')); + } +} diff --git a/testapps/php80_extensions/tests/RdkafkaTest.php b/testapps/php80_extensions/tests/RdkafkaTest.php new file mode 100644 index 00000000..2e522a4e --- /dev/null +++ b/testapps/php80_extensions/tests/RdkafkaTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('rdkafka')); + } +} diff --git a/testapps/php80_extensions/tests/bootstrap.php b/testapps/php80_extensions/tests/bootstrap.php new file mode 100644 index 00000000..f76545c7 --- /dev/null +++ b/testapps/php80_extensions/tests/bootstrap.php @@ -0,0 +1,17 @@ + + + + + tests + + + diff --git a/testapps/php80_extensions_legacy/tests/Blank300.png b/testapps/php80_extensions_legacy/tests/Blank300.png new file mode 100644 index 0000000000000000000000000000000000000000..e96fe466c1a8cd40d54a80844880b78f7137bf04 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!89CU1WQxUPO(4aV|H(?D8gCb z5n0T@z%2~Ij105pNB{-dOFVsD*{^c5h_NtFjy?r4K(@p+qQp5rH#aq}gu%HeHL)Z$ zMWH;iBts!2BUQoO(>LIKifSHEp_r$OV@SoVassertTrue(extension_loaded('ev')); + } + + public function testTimer() + { + // after 5ms, update success + $w1 = new EvTimer(0.005, 0, function () { + $this->success = true; + }); + Ev::run(); + + // sleep 10ms + usleep(10000); + + Ev::stop(); + + $this->assertTrue($this->success); + } +} diff --git a/testapps/php80_extensions_legacy/tests/EventTest.php b/testapps/php80_extensions_legacy/tests/EventTest.php new file mode 100644 index 00000000..1fe6535f --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/EventTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('event')); + } +} diff --git a/testapps/php80_extensions_legacy/tests/ExtensionsLoadedTest.php b/testapps/php80_extensions_legacy/tests/ExtensionsLoadedTest.php new file mode 100644 index 00000000..f9e5d40a --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/ExtensionsLoadedTest.php @@ -0,0 +1,57 @@ +assertTrue(extension_loaded($extensionName)); + } + + public function extensions() + { + return [ + ['amqp'], + ['bitset'], + ['couchbase'], + ['ds'], + ['eio'], + // ['hprose'], + ['igbinary'], + ['krb5'], + // ['lua'], + ['lzf'], + ['memprof'], + ['opencensus'], + ['raphf'], + ['seaslog'], + // ['stackdriver_debugger'], + ['stomp'], + ['sync'], + // ['tcpwrap'], + ['timezonedb'], + ['vips'], + ['yaconf'], + ['yaf'], + ['yaml'] + ]; + } +} diff --git a/testapps/php80_extensions_legacy/tests/GdTest.php b/testapps/php80_extensions_legacy/tests/GdTest.php new file mode 100644 index 00000000..400655dc --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/GdTest.php @@ -0,0 +1,37 @@ +markTestSkipped( + 'The gd extension is not available.' + ); + } + } + + public function testFreetypeSupport() + { + $this->assertTrue( + gd_info()['FreeType Support'], + 'GD should support Freetype' + ); + } +} diff --git a/testapps/php80_extensions_legacy/tests/GmpTest.php b/testapps/php80_extensions_legacy/tests/GmpTest.php new file mode 100644 index 00000000..ed7e0821 --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/GmpTest.php @@ -0,0 +1,34 @@ +assertTrue(extension_loaded('gmp')); + } + + public function testGcd() + { + // basic test for greatest common denominator to see if gmp works + $this->assertEquals( + 3, + gmp_intval(gmp_gcd("12", "21")) + ); + } +} diff --git a/testapps/php80_extensions_legacy/tests/ImagickTest.php b/testapps/php80_extensions_legacy/tests/ImagickTest.php new file mode 100644 index 00000000..4670b141 --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/ImagickTest.php @@ -0,0 +1,35 @@ +assertTrue(extension_loaded('imagick')); + } + + public function testLoadImage() + { + $image = new Imagick(__DIR__ . '/Blank300.png'); + $dimensions = $image->getImageGeometry(); + $this->assertEquals(300, $dimensions['width']); + $this->assertEquals(1, $dimensions['height']); + } +} diff --git a/testapps/php80_extensions_legacy/tests/OauthTest.php b/testapps/php80_extensions_legacy/tests/OauthTest.php new file mode 100644 index 00000000..f0fa2572 --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/OauthTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('oauth')); + } +} diff --git a/testapps/php80_extensions_legacy/tests/ProtobufTest.php b/testapps/php80_extensions_legacy/tests/ProtobufTest.php new file mode 100644 index 00000000..0d9606e5 --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/ProtobufTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('protobuf')); + } +} diff --git a/testapps/php80_extensions_legacy/tests/RdkafkaTest.php b/testapps/php80_extensions_legacy/tests/RdkafkaTest.php new file mode 100644 index 00000000..2e522a4e --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/RdkafkaTest.php @@ -0,0 +1,27 @@ +assertTrue(extension_loaded('rdkafka')); + } +} diff --git a/testapps/php80_extensions_legacy/tests/bootstrap.php b/testapps/php80_extensions_legacy/tests/bootstrap.php new file mode 100644 index 00000000..f76545c7 --- /dev/null +++ b/testapps/php80_extensions_legacy/tests/bootstrap.php @@ -0,0 +1,17 @@ +