Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
chore(php): Support php 7.4 (#94)
Browse files Browse the repository at this point in the history
- Add php 7.4 pipelines (travis/circle)
- Configure Dockerfile to support php 7.4
- Update dependencies
  • Loading branch information
k911 authored Dec 13, 2019
1 parent 02d10a9 commit 75e7f23
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 38 deletions.
32 changes: 23 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,30 +235,40 @@ jobs:
<<: *docker-env
<<: *docker-coverage
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"
CC_TEST_REPORTER_ID: 77af0c58a2646fe49fb7df502c38a56560e074fbc8b3086f2d33032b44c885a8

php-73:
<<: *docker-env
<<: *docker-default
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"

php-73-latest:
<<: *docker-env
<<: *docker-default
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"
COMPOSER_ARGS: update --ignore-platform-reqs
SWOOLE_VERSION: latest

php-73-lowest:
<<: *docker-env
<<: *docker-default
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"
COMPOSER_ARGS: update --prefer-lowest

# php-74-rc:
# <<: *docker-env
# <<: *docker-default
# environment:
# PHP_VERSION: 7.4-rc
php-74:
<<: *docker-env
<<: *docker-default
environment:
PHP_VERSION: 7.4
PHP_API_VERSION: "20190902"

check-composer-config:
docker:
Expand Down Expand Up @@ -302,12 +312,16 @@ jobs:
<<: *docker-env
<<: *docker-release
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"
DRY_RUN: "0"

release-version-dry-run:
<<: *docker-env
<<: *docker-release
environment:
PHP_VERSION: 7.3
PHP_API_VERSION: "20180731"
DRY_RUN: "1"
GH_TOKEN: "xxxx"

Expand Down Expand Up @@ -341,10 +355,10 @@ workflows:
<<: *pull-request-checks-job-filters
requires:
- check-composer-config
# - php-74-rc:
# <<: *pull-request-checks-job-filters
# requires:
# - check-composer-config
- php-74:
<<: *pull-request-checks-job-filters
requires:
- check-composer-config
release:
jobs:
- shellcheck:
Expand Down
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ matrix:
env:
- "COMPOSER_ARGS='update --prefer-lowest'"
- php: "7.3"
env:
- DEPLOY=1
- php: "7.3"
env:
- SWOOLE_LATEST=1
Expand All @@ -30,12 +28,16 @@ matrix:
- php: "7.3"
env:
- COMPOSER_ARGS=update
- php: "7.4"
env:
- SWOOLE_LATEST=1
- COMPOSER_ARGS='update --ignore-platform-reqs'
fast_finish: true
#allow_failures:
# - php: "7.3"
# env:
# - SWOOLE_LATEST=1
# - COMPOSER_ARGS='update --ignore-platform-reqs'
allow_failures:
- php: "7.4"
env:
- SWOOLE_LATEST=1
- COMPOSER_ARGS='update --ignore-platform-reqs'
# - php: "7.3"
# env:
# - SWOOLE_LATEST=1
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_TAG="7.3-cli-alpine3.10"
ARG PHP_TAG="7.4-cli-alpine3.10"
ARG COMPOSER_TAG="1.9.1"

FROM php:$PHP_TAG as ext-builder
Expand Down Expand Up @@ -44,7 +44,7 @@ RUN addgroup -g 1000 -S runner && \
chown app:runner /usr/src/app
RUN apk add --no-cache libstdc++ icu
# php -i | grep 'PHP API' | sed -e 's/PHP API => //'
ARG PHP_API_VERSION="20180731"
ARG PHP_API_VERSION="20190902"
COPY --from=ext-swoole /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/swoole.so
COPY --from=ext-swoole /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini
COPY --from=ext-inotify /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/inotify.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/inotify.so
Expand All @@ -68,7 +68,7 @@ RUN composer dump-autoload --classmap-authoritative --ansi

FROM base as base-coverage-xdebug
RUN apk add --no-cache bash lsof
ARG PHP_API_VERSION="20180731"
ARG PHP_API_VERSION="20190902"
COPY --from=ext-xdebug /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/xdebug.so
COPY --from=ext-xdebug /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
USER app:runner
Expand All @@ -78,7 +78,7 @@ COPY --chown=app:runner --from=composer-bin /usr/bin/composer /usr/local/bin/com
COPY --chown=app:runner --from=app-installer /usr/src/app ./

FROM base as base-coverage-pcov
ARG PHP_API_VERSION="20180731"
ARG PHP_API_VERSION="20190902"
COPY --from=ext-pcov /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/pcov.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/pcov.so
COPY --from=ext-pcov /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini
USER app:runner
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
"process-timeout": 600,
"sort-packages": true,
"platform": {
"php": "7.3.10",
"ext-swoole": "4.4.7"
"php": "7.3.11",
"ext-swoole": "4.4.12"
}
}
}
25 changes: 13 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "3.6"
x-env-aliases:
- &DEFAULT_BUILD_ARGS
PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.10}"
PHP_API_VERSION: "${PHP_API_VERSION:-20180731}"
PHP_TAG: "${PHP_VERSION:-7.4}-cli-alpine${ALPINE_VERSION:-3.10}"
PHP_API_VERSION: "${PHP_API_VERSION:-20190902}"
COMPOSER_ARGS: "${COMPOSER_ARGS:-install}"
SWOOLE_VERSION: "${SWOOLE_VERSION:-4.4.12}"
COMPOSER_TAG: "${COMPOSER_TAG:-1.9.1}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ final class ReplacedContentTestController
* methods={"GET"},
* path="/test/replaced/content"
* )
*
* @return Response
*/
public function index(): Response
{
Expand Down

0 comments on commit 75e7f23

Please sign in to comment.