Skip to content

Commit

Permalink
test on PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
othillo committed Dec 9, 2020
1 parent e3c1115 commit 03757dd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor/
composer.lock
.php_cs.cache
2 changes: 2 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__);

Expand Down
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)

0 comments on commit 03757dd

Please sign in to comment.