Skip to content

Commit

Permalink
Merge pull request #106 from Dealerdirect/feature/allow-installation-…
Browse files Browse the repository at this point in the history
…on-php-8

Allow installation on PHP 8
  • Loading branch information
Potherca committed Feb 16, 2020
2 parents 8001af8 + db97d73 commit 6971000
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .travis.yml
Expand Up @@ -77,6 +77,13 @@ jobs:
dist: precise
env: PHPCS_VERSION="2.0.0"

- php: nightly
env: PHPCS_VERSION="dev-master" LINT=1

allow_failures:
# Allow failures for unstable builds.
- php: "nightly"

fast_finish: true

before_install:
Expand All @@ -93,7 +100,13 @@ install:
# Install PHPCompatibility 8.x for PHPCS 2.2 < 2.3.
composer require --no-update --no-suggest --no-scripts phpcompatibility/php-compatibility:"^8.0"
fi
- travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose
- |
if [[ $TRAVIS_PHP_VERSION != "nightly" ]]; then
travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose
else
composer require --no-update --no-suggest --no-scripts phpcompatibility/php-compatibility
travis_wait composer install --no-dev --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose --ignore-platform-reqs
fi
- |
if [[ ${PHPCS_VERSION:0:3} < "2.2" ]]; then
# Rename the PHPCompatibility directory as PHPCompatibility 7.x wasn't fully compatible with Composer yet.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -23,9 +23,9 @@
"source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
},
"require": {
"php": "^5.3|^7",
"php": ">=5.3",
"composer-plugin-api": "^1.0",
"squizlabs/php_codesniffer": "^2|^3"
"squizlabs/php_codesniffer": "^2 || ^3"
},
"require-dev": {
"composer/composer": "*",
Expand Down

0 comments on commit 6971000

Please sign in to comment.