forked from DoclerLabs/codeception-slim-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Check PHP 8.2 compatibility * Add psalm to static analysis
- Loading branch information
Showing
12 changed files
with
146 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Exclude files that don't need to be present in packages (so they're not downloaded by Composer) | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
/.github/ export-ignore | ||
.gitignore export-ignore | ||
.php-cs-fixer.dist.php export-ignore | ||
codeception.yml export-ignore | ||
/Makefile export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/psalm.xml export-ignore | ||
/test/ export-ignore | ||
/vendor-bin/ export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# Files | ||
.php_cs | ||
.php_cs.cache | ||
/composer.lock | ||
composer.lock | ||
/phpstan.neon | ||
!/test/output/.gitkeep | ||
|
||
# Directories | ||
/test/output/* | ||
/test/support/_generated | ||
/vendor | ||
/vendor-bin/**/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " test to perform tests." | ||
@echo " tests to perform tests." | ||
@echo " coverage to perform tests with code coverage." | ||
@echo " static to run phpstan and php-cs-fixer check." | ||
@echo " static-phpstan to run phpstan." | ||
@echo " static-psalm to run psalm." | ||
@echo " static-cs-check to run php-cs-fixer." | ||
@echo " static-cs-fix to run php-cs-fixer, writing the changes." | ||
|
||
.PHONY: test | ||
test: | ||
tests: | ||
vendor/bin/codecept build | ||
vendor/bin/codecept run | ||
|
||
.PHONY: coverage | ||
coverage: | ||
vendor/bin/codecept build | ||
vendor/bin/codecept run --coverage --coverage-xml --coverage-html | ||
|
||
.PHONY: static | ||
static: static-phpstan static-cs-check | ||
static: static-phpstan static-psalm static-cs-check | ||
|
||
static-phpstan: | ||
docker run --rm -it -e REQUIRE_DEV=true -v ${PWD}:/app -w /app oskarstark/phpstan-ga:0.12.85 analyze $(PHPSTAN_PARAMS) | ||
composer install | ||
composer bin phpstan install | ||
vendor/bin/phpstan analyze $(PHPSTAN_PARAMS) | ||
|
||
static-psalm: | ||
composer install | ||
composer bin psalm install | ||
vendor/bin/psalm.phar $(PSALM_PARAMS) | ||
|
||
static-cs-fix: | ||
docker run --rm -it -v ${PWD}:/app -w /app oskarstark/php-cs-fixer-ga:2.19.0 --diff-format udiff $(CS_PARAMS) | ||
composer install | ||
composer bin php-cs-fixer install | ||
vendor/bin/php-cs-fixer fix --diff $(CS_PARAMS) | ||
|
||
static-cs-check: | ||
$(MAKE) static-cs-fix CS_PARAMS="--dry-run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="6" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
findUnusedBaselineEntry="true" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
<ignoreFiles> | ||
<directory name="vendor" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"require-dev": { | ||
"php": "^8.0", | ||
"friendsofphp/php-cs-fixer": "^3.15" | ||
}, | ||
"config": { | ||
"preferred-install": "dist" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"require-dev": { | ||
"php": "^8.0", | ||
"phpstan/phpstan": "^1.10", | ||
"phpstan/phpstan-deprecation-rules": "^1.1" | ||
}, | ||
"config": { | ||
"preferred-install": "dist" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"require-dev": { | ||
"php": "^8.0", | ||
"psalm/phar": "^5.8" | ||
}, | ||
"config": { | ||
"preferred-install": "dist" | ||
} | ||
} |