Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Support for PHP 7.4 and PHP 8.0 #532

Closed
wants to merge 170 commits into from

Conversation

frost-byte
Copy link
Contributor

There is a lot to cover in this PR.

Here is a list of just some of the changes:

  • Add support for PHP7.4 and PHP 8.0
  • Use bionic instead of xenial for all Docker Images
    • Provides newer version of ssl1.1 out of the box
  • Keep support for 7.3, but remove previous versions < 7.4
  • Miscellaneous Changes
    • Update tests to use latest version of phpunit (v.9.5.4)
    • Update extensions to newer/more recent builds
    • Added a function for using latest commit from git for building extensions
      • imagick
      • phalcon
      • pq
      • raphf
      • stackdriver_debugger
      • v8js
  • Libraries
    • Add librabbitmq to support newer version of the amqp extension
    • Cassandra uses libuv provided by Datastax
    • Removed libvips, can now use version bundled with bionic (libvips42)
  • Extensions that are now built into PHP natively and no longer bundled as separate extensions
    • apcu
    • jsond/jsonc (7.4, 8.0 are built in)
    • sodium
  • Extensions that are obsolete
    • apcu_bc (7.4, 8.0 are built in)
  • Extensions that require updates upstream for php8
    • hprose
    • lua
    • opencensus (official compatible release should be coming soon)
    • phalcon
    • stackdriver_debugger (I'm testing/updating a fork to support php8)
    • tcpwrap
  • Extensions not building
    • v8js - could not find libv8_libplatform library

There are a few things that still need to be reviewed:

  • Re-enable license checks in container structure testing (testapps containers)
  • Run End-to-End tests
  • The previous nginx configuration/version used was no longer recognizing the set_by_lua directive, I have switched to using the ppa from Ondrej for nginx-mainline v1.19; if I can determine enable the lua module for the package in bionic, then that can be used in its place

I have included a NOTES.md file containing some of the steps required to build packages, create distributions and build images.
Some of this information is spread about in the previous release, but some was not clear.

Additional customizations have also been added, so you can specify your own GCS buckets and use your GCP Project ID to host the containers and package artifacts for the distributions you create for each PHP version supported.

Takashi Matsuo and others added 30 commits November 1, 2017 16:24
* Compile stackdriver_debugger extension from master source from GitHub

* Remove stackdriver_trace from extension build and build debugger extension by default

* Fix list of compiled extensions on README

* Fix copyright for stackdriver debugger .deb
* Make local development easier

When doing local development and attempting to replicate the live environment, the ability to use local volumes replicated into the docker container are crucial. Unfortunately this file will then lock down the files inside the development environment as well as the files in the docker container. This adds an environment variable to turn off the lock down in the case of attempting to do the above.

* Changed the env var to SKIP_LOCKDOWN_DOCUMENT_ROOT

Also moved the chsh call out from the if block.
* Making the default to PHP 7.2

* Moved the comment due to a warning for an empty continuation line

* Temporary disable the structure test on php72-custom

* Re-enabled the structure test for php72-custom

* Use asterisk for the PHP micro versions in composer.json

* Fixed the version test for 7.2.0

* PHP 7.2.0 test fixes

* Runtime Buidler test fixes

* Added google/gax dep
…dPlatform#397)

* Allow versions like 3.5.0.1 for extension debian packages

* Escape dots in the regex

* Allow any additional string in the version part
* Use opencensus alpha

* Use stackdriver_debugger devel channel
* Add igbinary extension

* Add ip2location extension

* Build libip2location shared library as well

* Compile bitset extension

* use the latest bitset from PECL for PHP 7+

* skip ip2location until we can build it in a more secure way
…Platform#405)

* Enable stackdriver_debugger, bitset, igbinary in the extension enabler

* Adding extension tests for bitset, igbinary for extension enabler

* stackdriver debugger package name is hyphenated
…tform#406)

Sara did PHP 7.1 release this time temporarily because both of the 7.1
release managers were not available. This should not happen often.
* Add ext-iconv to composer.json for extension tests. Add 7.2 tests.

iconv is compiled into our PHP. If you specify an extension in the
composer.json that is already installed, but not on the list of
available extensions to install, deployment fails.

This deployment should fail for now.

* Run the php 7.2 extension tests as well

* If the requested extension is already loaded, skip validation

* Fix libsodium test for 7.2 until rebuilt
* Add php 7.2 version check

* Fix pattern in PHP 7.2 version test

* Temporarily serialize integration tests to isolate test failure

* Revert "Temporarily serialize integration tests to isolate test failure"

This reverts commit 09071b5.

* Add explicit .gcloudignore file so the php-test.yaml builder file will be used in tests
* Allow building deprecated mongo from pecl

The mongo pecl extension is needed for phalcon as the object document
mapper provided by phalcon works exclusively with the deprecated library

* Use the correct copyright for mongo pecl

* Use cp instead of mv for config files

When config files are inside a docker volume used as the document root
it will cause any config files that move-config-files.sh moves to
effectively disappear from the docker volume which is unintended
behaviour.

Fixes GoogleCloudPlatform#419

* Normalise copyright and version req

Updated the copyright to remove the full licence message and ensure
building only for php 5.6
…udPlatform#425)

* Add script to locate the stackdriver prepend file

* Remove unused constant

* Use realpath

* Fix prepend.php filename

* Run integration test of build pipeline with enable_stackdriver_integration: true

* Rename test directory for deployment host name length

* Fix test directory in yaml config

* shorten deploy tag for stackdriver deployment test

* Set the google/cloud version for the build pipeline with stackdriver test
@google-cla
Copy link

google-cla bot commented May 9, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label May 9, 2021
Turn on debugging for gcloud to determine cause of build failure.
Authorize service account in install_test_dependencies.sh
Remove Unsupported Versions < 7.3
Set 8.0.5 as default PHP version
Update PHPUnit to v9.5.4 for all tests
Temporarily Disable Tests for Phalcon
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 schemaVersion 2.0.0 for Structure Tests
Use the ev extension when testing for shared, disabled extension
Make the container for the Test Runner base image configurable using env
Change Test Runner base image to php80 from php73
Update `check_versions.sh` to include substition for container registry
@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":302:{a:2:{s:7:"defects";a:3:{s:29:"VersionTest::testPHP73Version";i:3;s:29:"VersionTest::testPHP74Version";i:3;s:29:"VersionTest::testPHP80Version";i:3;}s:5:"times";a:3:{s:29:"VersionTest::testPHP73Version";d:0.105;s:29:"VersionTest::testPHP74Version";d:0.076;s:29:"VersionTest::testPHP80Version";d:0.075;}}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file not require. Add this file to .gitignore

Copy link
Contributor Author

@frost-byte frost-byte May 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I'll be updating this shortly, just have to disable stackdriver for php8, as it still needs some work for it to be compatible. The other two issues will also be updated with the next submit.

@@ -18,7 +18,8 @@
# A shell script for dumping php versions to files.
set -xe

PHP_SHORT_NAMES=(php71 php72 php73 php74)
PHP_SHORT_NAMES=(php73 php74 php80)
# PHP_SHORT_NAMES=(php73 php74 php80)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":697:{a:2:{s:7:"defects";a:4:{s:50:"Google\Cloud\tests\PHP80CustomTest::testExtensions";i:3;s:74:"Google\Cloud\tests\PHP80CustomTest::testApcIsAbleToExecuteCommonOperations";i:4;s:54:"Google\Cloud\tests\PHP80CustomTest::testImagickCanLoad";i:4;s:62:"Google\Cloud\tests\PHP80CustomTest::testFrontControllerFileEnv";i:4;}s:5:"times";a:4:{s:50:"Google\Cloud\tests\PHP80CustomTest::testExtensions";d:0.033000000000000002;s:74:"Google\Cloud\tests\PHP80CustomTest::testApcIsAbleToExecuteCommonOperations";d:0.10199999999999999;s:54:"Google\Cloud\tests\PHP80CustomTest::testImagickCanLoad";d:0.0080000000000000002;s:62:"Google\Cloud\tests\PHP80CustomTest::testFrontControllerFileEnv";d:0.0030000000000000001;}}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this file to .gitignore

@google-cla
Copy link

google-cla bot commented May 9, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels May 9, 2021
@frost-byte
Copy link
Contributor Author

I'm going to fix issues with the repo caused by removing the .cache file from the previous commits.

Update PHP 8 to v8.0.6
Update PHP 7.4 to v7.4.19
Enable all tests during `scripts/build_images.sh`
Verify all testapps complete without errors
Use apcu extension in php80 instead of apcu_bc
Include all packages required for vips
Fix broken symlink for libcassandra
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
Use bionic distro version of libvips instead of building it
Create xmlrpc extension
Fix incorrect dependency for librabbitmq in debian package
Update tests to use v5 of `symfony/browser-kit`
Use php base image when building images for testing
@google-cla
Copy link

google-cla bot commented May 10, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@frost-byte
Copy link
Contributor Author

Going to close this and resubmit it...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.