From c6e8bc3c251fd181b8e49dadd9dd34c8a6b580ca Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 16:25:01 +0200 Subject: [PATCH 01/11] Test on Php 7.3 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 64d0d30..7545667 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - hhvm install: composer install --no-interaction --classmap-authoritative From d1a4658bade1b783811e90d7971689f493c76352 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:35:03 +0200 Subject: [PATCH 02/11] Remove code standard dependency --- composer.json | 1 - run-php-cs-fixer.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 run-php-cs-fixer.sh diff --git a/composer.json b/composer.json index 9e40d07..f133ac3 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ }, "require-dev": { "phpunit/phpunit": "^6.0", - "friendsofphp/php-cs-fixer": "^2.0", "php-coveralls/php-coveralls": "^2.0" } } diff --git a/run-php-cs-fixer.sh b/run-php-cs-fixer.sh new file mode 100644 index 0000000..ca32d67 --- /dev/null +++ b/run-php-cs-fixer.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# +# Runs code standard fixer without having the need to specify it as a +# Composer dependency. +# + +composer require --no-interaction friendsofphp/php-cs-fixer:^2.0 + +vendor/bin/php-cs-fixer --config=.php_cs.dist --no-interaction fix + +composer remove --no-interaction friendsofphp/php-cs-fixer From 0c566d2674e137c06e685b6aab38ff882843cf51 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:37:43 +0200 Subject: [PATCH 03/11] Remove coveralls dependency --- .travis.yml | 4 +++- composer.json | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7545667..34d87ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,9 @@ install: composer install --no-interaction --classmap-authoritative script: vendor/bin/phpunit --configuration phpunit.xml -after_success: vendor/bin/php-coveralls --verbose +after_success: + - composer require --no-interaction php-coveralls/php-coveralls:^2.0 + - vendor/bin/php-coveralls --verbose notifications: email: false diff --git a/composer.json b/composer.json index f133ac3..0d10691 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^6.0", - "php-coveralls/php-coveralls": "^2.0" + "phpunit/phpunit": "^6.0" } } From d2ec10e41c7601892a6b8dc24ad3e95d83a0c37f Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:42:42 +0200 Subject: [PATCH 04/11] Remove phpunit dependency --- .travis.yml | 2 +- composer.json | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34d87ef..29c928c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ php: install: composer install --no-interaction --classmap-authoritative -script: vendor/bin/phpunit --configuration phpunit.xml +script: ./run-phpunit.sh after_success: - composer require --no-interaction php-coveralls/php-coveralls:^2.0 diff --git a/composer.json b/composer.json index 0d10691..7872385 100644 --- a/composer.json +++ b/composer.json @@ -35,8 +35,5 @@ }, "require": { "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" } } From f967349de3177dc96490eb75cb8c97ae62beafce Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:42:49 +0200 Subject: [PATCH 05/11] Remove phpunit dependency --- run-phpunit.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 run-phpunit.sh diff --git a/run-phpunit.sh b/run-phpunit.sh new file mode 100644 index 0000000..5af62d7 --- /dev/null +++ b/run-phpunit.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# +# Runs code standard fixer without having the need to specify it as a +# Composer dependency. +# + +composer require --no-interaction phpunit/phpunit:^6.0 + +vendor/bin/phpunit --configuration phpunit.xml + +composer remove --no-interaction phpunit/phpunit From 0f2bc5c6b5603aeecd8955b79ecbdab5009dcb63 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:45:33 +0200 Subject: [PATCH 06/11] Make phpunit runnable --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 29c928c..716ed4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,9 @@ php: install: composer install --no-interaction --classmap-authoritative -script: ./run-phpunit.sh +script: + - chmod +x run-phpunit.sh + - ./run-phpunit.sh after_success: - composer require --no-interaction php-coveralls/php-coveralls:^2.0 From 41be6abacfcdb53ec4e49fa2917f0fb9898ae955 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:48:30 +0200 Subject: [PATCH 07/11] Dont install phpunit on travis, it's already there --- run-phpunit.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/run-phpunit.sh b/run-phpunit.sh index 5af62d7..05c0ded 100644 --- a/run-phpunit.sh +++ b/run-phpunit.sh @@ -5,8 +5,13 @@ # Composer dependency. # -composer require --no-interaction phpunit/phpunit:^6.0 +if [ $TRAVIS = true ]; then + # No need to install PHPunit + phpunit --configuration phpunit.xml +else + composer require --no-interaction phpunit/phpunit:^6.0 -vendor/bin/phpunit --configuration phpunit.xml + vendor/bin/phpunit --configuration phpunit.xml -composer remove --no-interaction phpunit/phpunit + composer remove --no-interaction phpunit/phpunit +fi; \ No newline at end of file From c27416f2f1ccbf2aa4cc0c796ceae539318f0456 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:50:50 +0200 Subject: [PATCH 08/11] Dont install phpunit on travis, it's already there --- run-phpunit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-phpunit.sh b/run-phpunit.sh index 05c0ded..e2cfdf7 100644 --- a/run-phpunit.sh +++ b/run-phpunit.sh @@ -5,7 +5,7 @@ # Composer dependency. # -if [ $TRAVIS = true ]; then +if [ $TRAVIS == true ]; then # No need to install PHPunit phpunit --configuration phpunit.xml else From 320c86870c630a5327409b634ebcccdfcff128e8 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 17:55:00 +0200 Subject: [PATCH 09/11] Dont install phpunit on travis, it's already there --- run-phpunit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-phpunit.sh b/run-phpunit.sh index e2cfdf7..ce45569 100644 --- a/run-phpunit.sh +++ b/run-phpunit.sh @@ -5,7 +5,7 @@ # Composer dependency. # -if [ $TRAVIS == true ]; then +if [ $TRAVIS ]; then # No need to install PHPunit phpunit --configuration phpunit.xml else From 20035e3c43c3678a46c658efe61d69d1dfeffd48 Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 18:04:39 +0200 Subject: [PATCH 10/11] Remove hack --- .travis.yml | 1 - README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 716ed4f..8b0cbfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ php: - 7.1 - 7.2 - 7.3 - - hhvm install: composer install --no-interaction --classmap-authoritative diff --git a/README.md b/README.md index ced3b14..e0e7979 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master)](https://travis-ci.org/Ekman/Luhn-Algorithm) [![Coverage Status](https://coveralls.io/repos/github/Ekman/Luhn-Algorithm/badge.svg)](https://coveralls.io/github/Ekman/Luhn-Algorithm) -This is an implementation of the Luhn Algorithm for PHP and HHVM. The Luhn Algorithm is +This is an implementation of the Luhn Algorithm for PHP. The Luhn Algorithm is used to validate things like credit cards and national identification numbers. More information on the algorithm can be found at [Wikipedia](http://en.wikipedia.org/wiki/Luhn_algorithm). From 3a150eaa8c0d413081b81a2da3465e6d831e8b2b Mon Sep 17 00:00:00 2001 From: Niklas Ekman Date: Tue, 23 Oct 2018 18:06:09 +0200 Subject: [PATCH 11/11] Add coveralls to cache --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b0cbfd..df5d788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,15 +6,15 @@ php: - 7.2 - 7.3 -install: composer install --no-interaction --classmap-authoritative +install: + - composer install --no-interaction --classmap-authoritative + - composer require --no-interaction php-coveralls/php-coveralls:^2.0 script: - chmod +x run-phpunit.sh - ./run-phpunit.sh -after_success: - - composer require --no-interaction php-coveralls/php-coveralls:^2.0 - - vendor/bin/php-coveralls --verbose +after_success: vendor/bin/php-coveralls --verbose notifications: email: false