Skip to content
Permalink
Browse files

Run tests against PHP 7.3+ and check for cross-version support… (#1684)

* Move phpcs config to root folder

* Run tests against PHP 7.3 and PHP 7.4

* Check for cross-version support for PHP 5.4 and higher

* Only downgrade guzzle and phpseclib on Travis

Prevents downgrading dev dependencies
  • Loading branch information...
swissspidy authored and jdpedrie committed Jul 31, 2019
1 parent 5f98e13 commit 7826dd0c141280b7b882831ed3313343ce0e710b
Showing with 15 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +6 −2 .travis.yml
  3. +3 −1 composer.json
  4. +5 −0 style/ruleset.xml → phpcs.xml.dist
@@ -1,5 +1,6 @@
.DS_Store
phpunit.xml
phpcs.xml
composer.lock
vendor
examples/testfile-small.txt
@@ -23,13 +23,17 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot

# Test lowest dependencies on PHP 5.4
# (Guzzle 5.2, phpseclib 0.3)
matrix:
include:
- php: 5.4
env: COMPOSER_CMD="composer update --prefer-lowest" RUN_PHP_CS=true
env: COMPOSER_CMD="composer update phpseclib/phpseclib guzzlehttp/guzzle guzzlehttp/psr7 --prefer-lowest" RUN_PHP_CS=true
allow_failures:
- php: 7.4snapshot

before_install:
- composer self-update
@@ -44,4 +48,4 @@ before_script:

script:
- vendor/bin/phpunit
- if [[ "$RUN_PHP_CS" == "true" ]]; then vendor/bin/phpcs src --standard=style/ruleset.xml -np; fi
- if [[ "$RUN_PHP_CS" == "true" ]]; then vendor/bin/phpcs src -np; fi
@@ -20,7 +20,9 @@
"squizlabs/php_codesniffer": "~2.3",
"symfony/dom-crawler": "~2.1",
"symfony/css-selector": "~2.1",
"cache/filesystem-adapter": "^0.3.2"
"cache/filesystem-adapter": "^0.3.2",
"phpcompatibility/php-compatibility": "^9.2",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"
},
"suggest": {
"cache/filesystem-adapter": "For caching certs and tokens (using Google_Client::setCache)"
@@ -10,6 +10,11 @@
<!-- PHP code MUST use only UTF-8 without BOM. -->
<rule ref="Generic.Files.ByteOrderMark"/>

<!-- Check for cross-version support for PHP 5.4 and higher. -->
<rule ref="PHPCompatibility">
<config name="testVersion" value="5.4-"/>
</rule>

<!-- Check for duplicated class names -->
<rule ref="Generic.Classes.DuplicateClassName" />

0 comments on commit 7826dd0

Please sign in to comment.
You can’t perform that action at this time.