MNT PHP8 support

This commit is contained in:
Serge Latyntcev 2020-10-07 16:16:30 +13:00
parent d4658ff297
commit aee731df2a
2 changed files with 8 additions and 5 deletions

View File

@ -31,7 +31,7 @@ matrix:
fast_finish: true fast_finish: true
include: include:
- php: 7.1 - php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1 PDO=1 env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1 PDO=1 COMPOSER_ARG=--prefer-lowest
- php: 7.2 - php: 7.2
env: DB=PGSQL RECIPE_VERSION=4.x-dev PHPUNIT_COVERAGE_TEST=1 env: DB=PGSQL RECIPE_VERSION=4.x-dev PHPUNIT_COVERAGE_TEST=1
- php: 7.3 - php: 7.3
@ -40,6 +40,8 @@ matrix:
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 NPM_TEST=1 env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 NPM_TEST=1
- php: 7.4 - php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
- php: nightly
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 COMPOSER_ARG=--ignore-platform-reqs WITH_XDEBUG=1
before_script: before_script:
# Extra $PATH # Extra $PATH
@ -47,7 +49,7 @@ before_script:
# Init PHP # Init PHP
- phpenv rehash - phpenv rehash
- phpenv config-rm xdebug.ini - if [[ ! $WITH_XDEBUG ]] ; then phpenv config-rm xdebug.ini; fi
- export PATH=~/.composer/vendor/bin:$PATH - export PATH=~/.composer/vendor/bin:$PATH
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
@ -57,7 +59,7 @@ before_script:
# Fix for running phpunit 5 on php 7.4+ # Fix for running phpunit 5 on php 7.4+
- composer require --no-update sminnee/phpunit-mock-objects:^3 - composer require --no-update sminnee/phpunit-mock-objects:^3
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2; fi - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2; fi
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile - composer update --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile $COMPOSER_ARG
# Install NPM dependencies # Install NPM dependencies
- if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi - if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi

View File

@ -25,10 +25,11 @@
"silverstripe/reports": "^4.7@dev", "silverstripe/reports": "^4.7@dev",
"silverstripe/siteconfig": "^4.7@dev", "silverstripe/siteconfig": "^4.7@dev",
"silverstripe/versioned": "^1.7@dev", "silverstripe/versioned": "^1.7@dev",
"silverstripe/vendor-plugin": "^1.0" "silverstripe/vendor-plugin": "^1.0",
"php": "^7.1 || ^8"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^5.7" "sminnee/phpunit": "^5.7"
}, },
"extra": { "extra": {
"expose": [ "expose": [