From 903d26977ef087fe0c3690611fff601db3daeea4 Mon Sep 17 00:00:00 2001 From: Spamer Date: Thu, 4 Apr 2024 16:46:18 +0200 Subject: [PATCH] PHP stan bump --- composer.json | 4 ++-- makefile | 9 +++------ phpstan-low.neon | 2 +- phpstan.neon | 28 +--------------------------- 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 682c0d4..ea56d14 100644 --- a/composer.json +++ b/composer.json @@ -38,9 +38,9 @@ }, "require-dev": { "slevomat/coding-standard": "^8.0", - "spameri/dependency-mocker": "^1.3", + "spameri/dependency-mocker": "^1.3", "nette/tester": "^2.4", - "phpstan/phpstan": "0.12.84", + "phpstan/phpstan": "^1.10.66", "php-coveralls/php-coveralls": "^2.1", "nette/bootstrap": "^3.0", "nette/http": "^3.0.7", diff --git a/makefile b/makefile index 94e3570..72a8699 100644 --- a/makefile +++ b/makefile @@ -28,13 +28,10 @@ phpstan-lowest: vendor/bin/phpstan analyse -l 6 -c phpstan-low.neon src tests cs: - vendor/bin/phpcs --standard=ruleset.xml --cache=.phpcs-cache src tests/SpameriTests + vendor/bin/phpcs --standard=ruleset.xml --cache=.phpcs-cache src tests -cs-local: - vendor/bin/phpcs --standard=ruleset.xml src tests/SpameriTests - -cbf: - vendor/bin/phpcbf --standard=ruleset.xml src tests/SpameriTests +csf: + vendor/bin/phpcbf --standard=ruleset.xml src tests coverage: vendor/bin/tester $COVERAGE -s -c ./tests/php.ini-unix ./tests diff --git a/phpstan-low.neon b/phpstan-low.neon index 7969873..97de0bc 100644 --- a/phpstan-low.neon +++ b/phpstan-low.neon @@ -1,5 +1,5 @@ parameters: - excludes_analyse: + excludePaths: - %rootDir%/../../../tests/tmp/* checkGenericClassInNonGenericObjectType: false diff --git a/phpstan.neon b/phpstan.neon index ecfe68c..60bc197 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,39 +1,13 @@ parameters: - excludes_analyse: + excludePaths: - %rootDir%/../../../tests/tmp/* ignoreErrors: - - - message: "#^PHPDoc tag @throws with type Elasticsearch\\\\Common\\\\Exceptions\\\\ElasticsearchException is not subtype of Throwable$#" - count: 1 - path: src/ClientProvider.php - - - - message: "#^PHPDoc tag @throws with type Elasticsearch\\\\Common\\\\Exceptions\\\\ElasticsearchException is not subtype of Throwable$#" - count: 1 - path: src/Commands/TypeToNewIndex.php - - - - message: "#^Call to function array_key_exists\\(\\) with string and array\\ will always evaluate to false\\.$#" - count: 1 - path: src/Entity/Collection/AbstractElasticEntityCollection.php - - - - message: "#^Call to function array_key_exists\\(\\) with string and array\\ will always evaluate to false\\.$#" - count: 1 - path: src/Entity/Collection/AbstractEntityCollection.php - - - - message: "#^PHPDoc tag @throws with type Elasticsearch\\\\Common\\\\Exceptions\\\\ElasticsearchException is not subtype of Throwable$#" - count: 2 - path: src/Model/TypeToNewIndex/Migrate.php - - message: "#^Unable to resolve the template type T in call to method Nette\\\\DI\\\\Container\\:\\:getByType\\(\\)$#" count: 2 path: src/Model/ServiceLocator.php - checkGenericClassInNonGenericObjectType: false checkMissingIterableValueType: false