Skip to content

Commit

Permalink
enable phpstan on travis + level 1 fixes (#1201)
Browse files Browse the repository at this point in the history
* enable phpstan

* remove phpstan script from travis ci

* enable phpstan on travis again + makefile improvements
  • Loading branch information
smoench authored and chartjes committed Dec 18, 2018
1 parent 4a7e7f7 commit 7e94ccd
Show file tree
Hide file tree
Showing 19 changed files with 361 additions and 131 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${COMMIT_RANGE}")
- if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then IFS=$'\n' EXTRA_ARGS=('--path-mode=intersection' '--' ${CHANGED_FILES[@]}); fi
- vendor/bin/php-cs-fixer fix --config=.php_cs.dist --dry-run --diff -v --using-cache=no "${EXTRA_ARGS[@]}"
- vendor/bin/phpstan analyze

- &TEST

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: asset auto-review cache coverage cs database infection integration it stan test test-env unit

it: cs test
it: cs stan test

asset:
yarn install
Expand All @@ -26,13 +26,13 @@ database: test-env vendor
mysqldump -uroot cfp_test > tests/dump.sql

infection: vendor database
vendor/bin/infection --test-framework-options="--printer PHPUnit\\\TextUI\\\ResultPrinter"
php -d zend_extension=xdebug.so vendor/bin/infection

integration: test-env vendor database cache
vendor/bin/phpunit --testsuite integration

stan: vendor
vendor/bin/phpstan analyse --level=2 src tests
vendor/bin/phpstan analyse

test: auto-review integration unit

Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@
"codedungeon/phpunit-result-printer": "~0.23.2",
"friendsofphp/php-cs-fixer": "^2.13.0",
"fzaninotto/faker": "^1.5.0",
"infection/infection": "^0.7.0",
"infection/infection": "^0.9.3",
"jangregor/phpstan-prophecy": "^0.2.0",
"laravel/homestead": "^7.4",
"league/flysystem-memory": "1.0.1",
"localheinz/composer-normalize": "~0.9.0",
"localheinz/test-util": "0.6.0",
"mikey179/vfsStream": "^1.6.5",
"mockery/mockery": "^1.0.0",
"phpstan/phpstan": "~0.9.2",
"phpstan/phpstan": "^0.10.6",
"phpstan/phpstan-mockery": "^0.10.2",
"phpunit/phpunit": "^7.4.0",
"symfony/browser-kit": "^3.4.15",
"symfony/debug-bundle": "^3.4.15",
Expand Down
Loading

0 comments on commit 7e94ccd

Please sign in to comment.