Skip to content

Commit

Permalink
Add (testing) support for PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfausk committed Feb 23, 2021
1 parent 3761371 commit 83569a7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 83569a7

Please sign in to comment.