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

Commit

Permalink
Fixes for extensions, libraries and tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
frost-byte committed May 9, 2021
1 parent bc1bad3 commit e577874
Show file tree
Hide file tree
Showing 88 changed files with 1,489 additions and 362 deletions.
89 changes: 70 additions & 19 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,75 @@ GCP_PACKAGE_BUCKET="{your-unique-id}-gcp-php-packages" \
```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
- Fix Packaging for librabbitmq
- Re-enable all Structure tests
- Fix licensing tests or white list the couple of packages causing an issue
- Re-enable Extension and Custom tests
- The following extensions need updates to be compatible with php8
- hprose
- lua
- phalcon
- tcpwrap
- v8js
- Sodium is included in 7.4 and 8.0, re-enable tests if necessary
- PhalconTest removed for 8.0, determine if annotation can skip instead
- Determine how to enable lua module for bionic nginx OR determine if using PPA is suitable
- Review Changes/Additions to `package-build/functions.sh`
- Reconfigure travis settings for testing custom build, if necessary
- `VersionTest.php`
- Review changes
- Need to point to custom built artifacts, not ones affiliated with Google.
- 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`)
164 changes: 82 additions & 82 deletions cloudbuild-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '.']
dir: cloudbuild-test-runner
waitFor: ['php73-structure']
waitFor: ['php80-structure']
id: test-runner

# base tests
Expand All @@ -72,7 +72,7 @@ steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '.']
dir: php-onbuild
waitFor: ['php73']
waitFor: ['php80']
id: php-onbuild
- 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']
Expand Down Expand Up @@ -121,10 +121,10 @@ steps:
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
- 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
Expand All @@ -139,10 +139,10 @@ steps:
args: ['run', '--net=nw_$_TAG', '--name=php74-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG']
waitFor: ['php74-custom-build', 'test-network']
id: php74-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/php74_custom/tests']
# waitFor: ['php74-custom-app', 'test-runner']
# id: php74-custom-test
- 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/php74_custom/tests']
waitFor: ['php74-custom-app', 'test-runner']
id: php74-custom-test

# php73-custom test
- name: gcr.io/cloud-builders/docker
Expand All @@ -157,82 +157,82 @@ steps:
args: ['run', '--net=nw_$_TAG', '--name=php73-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG']
waitFor: ['php73-custom-build', 'test-network']
id: php73-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/php73_custom/tests']
# waitFor: ['php73-custom-app', 'test-runner']
# id: php73-custom-test

# # php73-extensions test
# - name: gcr.io/cloud-builders/docker
# args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
# dir: testapps/php73_extensions
# waitFor: ['php-onbuild']
# id: php73-extensions-build
# - name: gcr.io/cloud-builders/docker
# args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', 'ls -al; vendor/bin/phpunit']
# dir: testapps/php73_extensions
# waitFor: ['php73-extensions-build']
# id: php73-extensions-test

# # php73-extensions-legacy test
# - name: gcr.io/cloud-builders/docker
# args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
# dir: testapps/php73_extensions_legacy
# waitFor: ['php-onbuild']
# id: php73-extensions-legacy-build
# - 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']
# id: php73-extensions-legacy-test
- 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/php73_custom/tests']
waitFor: ['php73-custom-app', 'test-runner']
id: php73-custom-test

# php73-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
dir: testapps/php73_extensions
waitFor: ['php-onbuild']
id: php73-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php73_extensions
waitFor: ['php73-extensions-build']
id: php73-extensions-test

# php73-extensions-legacy test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
dir: testapps/php73_extensions_legacy
waitFor: ['php-onbuild']
id: php73-extensions-legacy-build
- 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-legacy-build']
id: php73-extensions-legacy-test

# php74-extensions test
# - name: gcr.io/cloud-builders/docker
# args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
# dir: testapps/php74_extensions
# waitFor: [ 'php-onbuild' ]
# id: php74-extensions-build
# - name: gcr.io/cloud-builders/docker
# args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
# dir: testapps/php74_extensions
# waitFor: [ 'php74-extensions-build' ]
# id: php74-extensions-test
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
dir: testapps/php74_extensions
waitFor: [ 'php-onbuild' ]
id: php74-extensions-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php74_extensions
waitFor: [ 'php74-extensions-build' ]
id: php74-extensions-test

# php74-extensions-legacy test
# - name: gcr.io/cloud-builders/docker
# args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
# dir: testapps/php74_extensions_legacy
# waitFor: [ 'php-onbuild' ]
# id: php74-extensions-legacy-build
# - name: gcr.io/cloud-builders/docker
# args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
# dir: testapps/php74_extensions_legacy
# waitFor: [ 'php74-extensions-build' ]
# id: php74-extensions-legacy-test

# php80-extensions test
# - 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', 'testapps/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', 'testapps/vendor/bin/phpunit' ]
# dir: testapps/php80_extensions_legacy
# waitFor: [ 'php80-extensions-build' ]
# id: php80-extensions-legacy-test
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
dir: testapps/php74_extensions_legacy
waitFor: [ 'php-onbuild' ]
id: php74-extensions-legacy-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php74_extensions_legacy
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:
Expand Down
17 changes: 3 additions & 14 deletions package-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Dockerfile used to build php binaries.
# Example usage:
# docker run -v /mydir:/workspace deb-package-builder 7.3.28-1,7.4.18-1,8.0.5-1
# 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_18_0_4
Expand Down Expand Up @@ -51,7 +51,7 @@ RUN apt-get update -y && \
librecode0 \
libsasl2-modules \
libsqlite3-0 \
libopenexr22 \
libvips-dev \
libxml2 \
libxslt1.1 \
sasl2-bin \
Expand All @@ -63,39 +63,28 @@ RUN apt-get update -y && \
# headers
libbz2-dev \
libcurl4-gnutls-dev \
fftw-dev \
libfreetype6-dev \
libgd-dev \
libgettextpo-dev \
libcfitsio-dev \
libgif-dev \
libgmp-dev \
libicu-dev \
libjpeg-turbo8-dev \
libjson-c-dev \
liblua5.3-dev \
libmagick++-dev \
libmatio-dev \
libmcrypt-dev \
libmemcached-dev \
libopenslide-dev \
liborc-0.4-dev \
libonig-dev \
libpango1.0-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libreadline6-dev \
libreadline-dev \
librecode-dev \
libsasl2-dev \
libsqlite3-dev \
libsodium-dev \
libwebp-dev \
libvips-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
libzip-dev \
libzip4 \
# out of date 1.0.2g ->
Expand Down
4 changes: 2 additions & 2 deletions package-builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,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,librabbitmq"
LIBRARIES="cassandra-cpp-driver,libv8,librabbitmq"
fi


Expand Down
2 changes: 1 addition & 1 deletion package-builder/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [ -z "${GOOGLE_PROJECT_ID}" ]; then
fi

if [ -z "${PHP_VERSIONS}" ]; then
PHP_VERSIONS='8.0.5-1,7.4.18-1,7.3.28-1'
PHP_VERSIONS='8.0.6-1,7.4.19-1,7.3.28-1'
echo "Defaulting PHP Versions to: ${PHP_VERSIONS}"
fi

Expand Down
Loading

0 comments on commit e577874

Please sign in to comment.