Skip to content

Commit d7db6ff

Browse files
authored
Merge pull request #12 from PHPCompatibility/feature/travis-check-self-exclude
Travis: add a check against false positives
2 parents f9d971a + 15c7928 commit d7db6ff

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ sudo: false
22

33
dist: trusty
44

5-
cache:
6-
apt: true
7-
85
language: php
96

107
## Cache composer downloads.
118
cache:
9+
apt: true
1210
directories:
1311
- $HOME/.cache/composer/files
1412

@@ -42,8 +40,12 @@ script:
4240
fi
4341
4442
# Test the rulesets.
45-
- vendor/bin/phpcs ./Test/ParagonieRandomCompatTest.php --standard=PHPCompatibilityParagonieRandomCompat --runtime-set testVersion 5.2
46-
- vendor/bin/phpcs ./Test/ParagonieSodiumCompatTest.php --standard=PHPCompatibilityParagonieSodiumCompat --runtime-set testVersion 5.3
43+
- vendor/bin/phpcs ./Test/ParagonieRandomCompatTest.php --standard=PHPCompatibilityParagonieRandomCompat --runtime-set testVersion 5.2-
44+
- vendor/bin/phpcs ./Test/ParagonieSodiumCompatTest.php --standard=PHPCompatibilityParagonieSodiumCompat --runtime-set testVersion 5.3-
45+
46+
# Check that the rulesets don't throw unnecessary errors for the compat libraries themselves.
47+
- vendor/bin/phpcs ./vendor/paragonie/random_compat/ --standard=PHPCompatibilityParagonieRandomCompat --runtime-set testVersion 5.2- --ignore=/random_compat/tests/*,/random_compat/other/*
48+
- vendor/bin/phpcs ./vendor/paragonie/sodium_compat/ --standard=PHPCompatibilityParagonieSodiumCompat --runtime-set testVersion 5.3- --ignore=/sodium_compat/tests/*
4749

4850
# Validate the composer.json file.
4951
# @link https://getcomposer.org/doc/03-cli.md#validate

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"phpcompatibility/php-compatibility" : "^9.0"
2222
},
2323
"require-dev" : {
24-
"dealerdirect/phpcodesniffer-composer-installer": "^0.5"
24+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
25+
"paragonie/random_compat": "dev-master",
26+
"paragonie/sodium_compat": "dev-master"
2527
},
2628
"suggest" : {
2729
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",

0 commit comments

Comments
 (0)