From 845d0bc119abee71c32eff5e92491253d66d9717 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Tue, 25 Jan 2022 20:40:48 +0100 Subject: [PATCH 1/2] improvements and bugfixes - upgraded PHPStan - downgraded ninjify/coding-standard --- Makefile | 2 +- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0d5f825..d454027 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ csf: vendor/bin/phpcbf --standard=ruleset.xml --extensions=php,phpt --tab-width=4 --ignore=temp -sp src tests phpstan: - vendor/bin/phpstan analyse -l max -c phpstan.neon --memory-limit=512M src + vendor/bin/phpstan analyse -l 8 -c phpstan.neon --memory-limit=512M src tests: vendor/bin/tester -s -p php --colors 1 -C tests diff --git a/composer.json b/composer.json index 803b857..4249d29 100644 --- a/composer.json +++ b/composer.json @@ -44,9 +44,9 @@ "nette/tester": "^2.4.0", "tracy/tracy": "^2.8.0", "mockery/mockery": "^1.3.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "ninjify/coding-standard": "^0.12" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "ninjify/coding-standard": "^0.11" }, "prefer-stable": true, "minimum-stability": "dev", From 14e430cc25df15a105d57e7416253b0a9098d79c Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 27 Jan 2022 17:25:18 +0100 Subject: [PATCH 2/2] phpstan++ --- Makefile | 2 +- phpstan.neon | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d454027..d6dec9b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ csf: vendor/bin/phpcbf --standard=ruleset.xml --extensions=php,phpt --tab-width=4 --ignore=temp -sp src tests phpstan: - vendor/bin/phpstan analyse -l 8 -c phpstan.neon --memory-limit=512M src + vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M tests: vendor/bin/tester -s -p php --colors 1 -C tests diff --git a/phpstan.neon b/phpstan.neon index 51733b3..a2976b7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,6 +2,9 @@ includes: - ./vendor/phpstan/phpstan-strict-rules/rules.neon parameters: + level: 8 + paths: + - src ignoreErrors: - '#^Strict comparison using === between string and null will always evaluate to false.$#' - '#^Parameter \#1 \$sql of method Nette\\Database\\Explorer::query\(\) expects literal-string, mixed given.$#'