From 83569a7d1719252dda988dc0671ab5be37edd41b Mon Sep 17 00:00:00 2001 From: robertfausk Date: Tue, 23 Feb 2021 14:59:47 +0100 Subject: [PATCH] Add (testing) support for PHP 8.0 --- .travis.yml | 7 +++++-- Dockerfile | 11 ++++++++--- docker-compose.yml | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcc679f..4c2ac67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,12 +29,15 @@ cache: install: - '.scenarios.lock/install "${SCENARIO}" "${DEPENDENCIES}"' - bin/updatePantherChromeDriver.sh + - # additionally place 'chromedriver' file also in folder 'driver' for symfony/panther >=0.9 + - mkdir drivers + - cp vendor/symfony/panther/chromedriver-bin/chromedriver_linux64 drivers/chromedriver script: - - vendor/bin/phpunit -v --coverage-clover=coverage.clover + - if [ "${TRAVIS_PHP_VERSION:0:3}" = "8.0" ]; then vendor/bin/phpunit -v; else vendor/bin/phpunit -v --coverage-clover=coverage.clover; fi - vendor/bin/behat --config=tests/Behat/behat.yml after_script: - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover + - if [ "${TRAVIS_PHP_VERSION:0:3}" != "8.0" ]; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi - 'travis_retry php vendor/bin/coveralls -v' diff --git a/Dockerfile b/Dockerfile index b40000f..e3aee24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY --from=composer /usr/bin/composer /usr/bin/composer ENV COMPOSER_ALLOW_SUPERUSER 1 ENV COMPOSER_HOME /home/docker/.composer # contains dev-mode packages -RUN composer global require "hirak/prestissimo:^0.3" "sllh/composer-versions-check:^2.0" "pyrech/composer-changelogs:^1.7" --prefer-dist --no-progress --no-suggest --classmap-authoritative +RUN composer global require "pyrech/composer-changelogs:^1.7" --prefer-dist --no-progress --no-suggest --classmap-authoritative ############################################################## # add symfony/panther @@ -32,8 +32,13 @@ RUN apt-get update && apt-get install -y \ libjpeg-dev \ libpng-dev -RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ && \ - docker-php-ext-install gd +RUN if [[ "${PHP_VERSION}" = "7.4*" ]] || [[ "${PHP_VERSION}" = "8.0*" ]]; then \ + docker-php-ext-configure gd --with-jpeg=/usr/include/ && \ + docker-php-ext-install gd \ + ;el \ + docker-php-ext-configure gd --with-jpeg=/usr/include/ && \ + docker-php-ext-install gd \ + ;fi WORKDIR /var/www/html COPY . /var/www/html diff --git a/docker-compose.yml b/docker-compose.yml index 3bba118..03b7263 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,3 +36,12 @@ services: - PHP_VERSION=7.4 volumes: - .:/var/www/html + + php8.0: + tty: true + build: + context: . + args: + - PHP_VERSION=8.0 + volumes: + - .:/var/www/html