Skip to content

Commit a2e2215

Browse files
authored
Test on PHP 7.3 (#15)
* Test on Php 7.3 * Remove code standard dependency * Remove coveralls dependency * Remove phpunit dependency * Remove phpunit dependency * Make phpunit runnable * Dont install phpunit on travis, it's already there * Dont install phpunit on travis, it's already there * Dont install phpunit on travis, it's already there * Remove hack * Add coveralls to cache
1 parent 43760fa commit a2e2215

File tree

5 files changed

+37
-9
lines changed

5 files changed

+37
-9
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ php:
44
- 7.0
55
- 7.1
66
- 7.2
7-
- hhvm
7+
- 7.3
88

9-
install: composer install --no-interaction --classmap-authoritative
9+
install:
10+
- composer install --no-interaction --classmap-authoritative
11+
- composer require --no-interaction php-coveralls/php-coveralls:^2.0
1012

11-
script: vendor/bin/phpunit --configuration phpunit.xml
13+
script:
14+
- chmod +x run-phpunit.sh
15+
- ./run-phpunit.sh
1216

1317
after_success: vendor/bin/php-coveralls --verbose
1418

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master)](https://travis-ci.org/Ekman/Luhn-Algorithm)
44
[![Coverage Status](https://coveralls.io/repos/github/Ekman/Luhn-Algorithm/badge.svg)](https://coveralls.io/github/Ekman/Luhn-Algorithm)
55

6-
This is an implementation of the Luhn Algorithm for PHP and HHVM. The Luhn Algorithm is
6+
This is an implementation of the Luhn Algorithm for PHP. The Luhn Algorithm is
77
used to validate things like credit cards and national identification numbers.
88
More information on the algorithm can be found at [Wikipedia](http://en.wikipedia.org/wiki/Luhn_algorithm).
99

composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,5 @@
3535
},
3636
"require": {
3737
"php": "^7.0"
38-
},
39-
"require-dev": {
40-
"phpunit/phpunit": "^6.0",
41-
"friendsofphp/php-cs-fixer": "^2.0",
42-
"php-coveralls/php-coveralls": "^2.0"
4338
}
4439
}

run-php-cs-fixer.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
#
4+
# Runs code standard fixer without having the need to specify it as a
5+
# Composer dependency.
6+
#
7+
8+
composer require --no-interaction friendsofphp/php-cs-fixer:^2.0
9+
10+
vendor/bin/php-cs-fixer --config=.php_cs.dist --no-interaction fix
11+
12+
composer remove --no-interaction friendsofphp/php-cs-fixer

run-phpunit.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
#
4+
# Runs code standard fixer without having the need to specify it as a
5+
# Composer dependency.
6+
#
7+
8+
if [ $TRAVIS ]; then
9+
# No need to install PHPunit
10+
phpunit --configuration phpunit.xml
11+
else
12+
composer require --no-interaction phpunit/phpunit:^6.0
13+
14+
vendor/bin/phpunit --configuration phpunit.xml
15+
16+
composer remove --no-interaction phpunit/phpunit
17+
fi;

0 commit comments

Comments
 (0)