Unverified Commit db1080b1 authored by Oliver Klee's avatar Oliver Klee Committed by GitHub
Browse files

[FEATURE] Add type checking via PHPStan (#218)

parent fc1b6902
......@@ -14,4 +14,5 @@
/codeception.yml export-ignore
/phive.xml
/phpcs.xml export-ignore
/phpstan.neon export-ignore
/tools/ export-ignore binary
......@@ -63,6 +63,7 @@ jobs:
- "php:sniff"
- "php:codestyle"
- "php:copypaste"
- "php:stan"
- "composer:normalize"
php-version:
- 7.4
......
......@@ -298,6 +298,17 @@ php-copypaste-check:
script:
- composer ci:php:copypaste
phpstan:
extends: .default
stage: codestyle
needs:
- build-composer-dependencies
- php-lint-php7.2
- php-lint-php7.3
- php-lint-php7.4
script:
- composer ci:php:stan
composer-normalize:
extends: .default
stage: codestyle
......
......@@ -37,6 +37,10 @@ All of those checks are available in Github Actions and in Gitlab CI.
`composer ci:php:copypaste`
### PHP type checking by [PHPStan](https://github.com/phpstan/phpstan)
`composer ci:php:stan`
### JSON Lint check by [jsonlint](https://github.com/Seldaek/jsonlint)
`composer ci:json:lint`
......
......@@ -89,6 +89,7 @@
"ci:php:copypaste": "php ./tools/phpcpd Classes Configuration Tests",
"ci:php:lint": "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
"ci:php:sniff": "php ./tools/phpcs Classes Configuration Tests",
"ci:php:stan": "php ./tools/phpstan analyse Classes",
"ci:static": [
"@ci:php:lint",
"@ci:php:sniff",
......
......@@ -6,4 +6,5 @@
<phar name="ergebnis/composer-normalize" version="^2.13.2" location="./tools/composer-normalize" copy="true" installed="2.13.2"/>
<phar name="friendsofphp/php-cs-fixer" version="^2.18.2" location="./tools/php-cs-fixer" copy="true" installed="2.18.2"/>
<phar name="martin-helmich/typo3-typoscript-lint" version="^2.4.1" location="./tools/typo3-typoscript-lint" copy="true" installed="2.4.1"/>
<phar name="phpstan" version="^0.12.81" installed="0.12.81" location="./tools/phpstan" copy="true"/>
</phive>
parameters:
level: 3
bootstrapFiles:
- .Build/vendor/autoload.php
scanDirectories:
- Classes
- Tests
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment