From 03757dd197a4b937868808c944286a8664587962 Mon Sep 17 00:00:00 2001 From: othillo Date: Mon, 7 Dec 2020 10:26:57 +0100 Subject: [PATCH] test on PHP 8.0 --- .gitignore | 1 + .php_cs.dist | 2 ++ .travis.yml | 17 +++++++++++++++++ Makefile | 17 +++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 3a9875b..3452648 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor/ composer.lock +.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist index ebacf5d..e20fd5f 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -1,5 +1,7 @@ in(__DIR__); diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5dfd36d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: php + +cache: + directories: + - $HOME/.composer/cache + - vendor + +php: + - 7.3 + - 7.4 + - 8.0 + +install: + - make dependencies + +script: + - make php-cs-fixer-ci diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a25ccf --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +.DEFAULT_GOAL:=help + +.PHONY: dependencies +dependencies: + composer install --no-interaction --no-suggest --no-scripts --ansi + +.PHONY: php-cs-fixer +php-cs-fixer: + vendor/bin/php-cs-fixer fix --no-interaction --allow-risky=yes --diff --verbose .php_cs.dist + +.PHONY: php-cs-fixer-ci +php-cs-fixer-ci: + vendor/bin/php-cs-fixer fix --dry-run --no-interaction --allow-risky=yes --diff --verbose .php_cs.dist + +# Based on https://suva.sh/posts/well-documented-makefiles/ +help: ## Display this help + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)