This commit is contained in:
Meritoo
2019-04-03 12:45:26 +02:00
parent 1db4a55e31
commit 87422af5c7
5 changed files with 23 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ Common and useful classes, methods, exceptions etc.
3. Implement Mutation Testing Framework (infection/infection package)
4. Travis CI > run many tasks using Phing (instead of PHPUnit only)
5. Fix integration with [Coveralls](https://www.coveralls.io) (available as the badge in [README.md](README.md))
6. Implement [PHPStan](https://github.com/phpstan/phpstan)
# 1.0.1

View File

@@ -24,6 +24,7 @@
"friendsofphp/php-cs-fixer": "^2.14",
"infection/infection": "^0.11.4",
"php-coveralls/php-coveralls": "^2.1",
"phpstan/phpstan": "^0.11.1",
"phpunit/phpunit": "^8.0",
"sebastian/phpcpd": "^4.1",
"squizlabs/php_codesniffer": " ^2.9"

View File

@@ -63,6 +63,15 @@ dir.docker = ${project.basedir}/docker
dir.docker.data = ${dir.docker}/data/db
dir.docker.logs = ${dir.docker}/logs/nginx
# --------------------------------------------------------------------------------
# Static Analysis
# --------------------------------------------------------------------------------
# Paths of frameworks used to run analysis:
# - PHPStan
#
check.phpstan.command = ./vendor/bin/phpstan analyse
# --------------------------------------------------------------------------------
# Testing
# --------------------------------------------------------------------------------

View File

@@ -43,7 +43,8 @@
<!-- Check target -->
<target name="build:check"
depends="check:cs,
check:cpd"
check:cpd,
check:phpstan"
/>
<!-- Test target -->
@@ -69,6 +70,11 @@
</phpcpd>
</target>
<!-- Run static analysis -->
<target name="check:phpstan" depends="build:prepare">
<exec command="${check.phpstan.command}" passthru="true"/>
</target>
<!-- PHPUnit tests -->
<target name="test:phpunit" depends="build:prepare">
<exec command="${tests.phpunit.command}" passthru="true"/>

5
phpstan.neon.dist Normal file
View File

@@ -0,0 +1,5 @@
parameters:
level: 1
paths:
- src
- tests