From 6fc24a42b068559013950b77e28e774a8f72b451 Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Fri, 25 Feb 2022 22:33:50 +0200 Subject: [PATCH 1/6] #68 Update PHPStan. --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index cc55734..a8c3080 100755 --- a/composer.json +++ b/composer.json @@ -44,8 +44,8 @@ "symplify/coding-standard": "^8.3", "squizlabs/php_codesniffer": "^3.4", "dealerdirect/phpcodesniffer-composer-installer": "*", - "mglaman/phpstan-drupal": "^0.12.2", - "phpstan/phpstan-deprecation-rules": "^0.12.2" + "mglaman/phpstan-drupal": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0" }, "autoload": { "psr-4": { From 36abfc5004c539e3d31f8b8f0879f24cd441e181 Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Fri, 25 Feb 2022 22:46:15 +0200 Subject: [PATCH 2/6] #68 Temporarily disable ECS (Until Drupal supports symfony/dependency-injection: ^5.1). --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index a8c3080..f7f0a43 100755 --- a/composer.json +++ b/composer.json @@ -40,8 +40,6 @@ "drupal/coder": "^8", "phpcompatibility/php-compatibility": "^9.3", "pheromone/phpcs-security-audit": "^2.0", - "wunderio/ecs-drupal": "^1.0", - "symplify/coding-standard": "^8.3", "squizlabs/php_codesniffer": "^3.4", "dealerdirect/phpcodesniffer-composer-installer": "*", "mglaman/phpstan-drupal": "^1.1", From 45a89627ffe0967f66d114f6addaa0b7a4722f8a Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Sat, 26 Feb 2022 00:06:20 +0200 Subject: [PATCH 3/6] #68 Disable ECS for now & code complexity check. --- config/grumphp.yml | 1 - config/phpstan.neon | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/config/grumphp.yml b/config/grumphp.yml index 56b35a0..54ec47c 100644 --- a/config/grumphp.yml +++ b/config/grumphp.yml @@ -10,7 +10,6 @@ grumphp: php_check_syntax: ~ phpcs: ~ php_stan: ~ - ecs: ~ yaml_lint: ~ json_lint: ~ extensions: diff --git a/config/phpstan.neon b/config/phpstan.neon index e88a8bb..d199b9b 100644 --- a/config/phpstan.neon +++ b/config/phpstan.neon @@ -10,16 +10,3 @@ parameters: includes: - %currentWorkingDirectory%/vendor/mglaman/phpstan-drupal/extension.neon - %currentWorkingDirectory%/vendor/phpstan/phpstan-deprecation-rules/rules.neon - - %currentWorkingDirectory%/vendor/symplify/coding-standard/packages/cognitive-complexity/config/cognitive-complexity-services.neon - -services: - - - class: Symplify\CodingStandard\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule - tags: [phpstan.rules.rule] - arguments: - maxMethodCognitiveComplexity: 16 - - - class: Symplify\CodingStandard\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule - tags: [phpstan.rules.rule] - arguments: - maxClassCognitiveComplexity: 50 From dc0c5f08d603243f1170b686466a9e4e1e53153d Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Tue, 1 Mar 2022 15:40:54 +0200 Subject: [PATCH 4/6] #68 Update PHP to 7.4 for running tests. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c72de28..a95b333 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: # Install all dependencies and run check tasks. build_and_test: docker: - - image: circleci/php:7.3.9-cli-node + - image: circleci/php:7.4-cli-node steps: # Check out source code. - checkout From 2bd5b4281e7a527f043e66919235f6d678bd879e Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Tue, 1 Mar 2022 15:42:58 +0200 Subject: [PATCH 5/6] #68 Remove --ignore-platform-reqs from tests. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a95b333..ca934ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: # Install composer dependencies. - run: >- export PATH="/home/circleci/.composer/vendor/bin:${PATH}" && - composer install --ignore-platform-reqs + composer install # Run all checkers. - run: ./vendor/bin/grumphp run # Save project with coverage for next step to be analysed. From a11dae27079144f289c95d7a1d44eae45bb44574 Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Tue, 1 Mar 2022 15:44:37 +0200 Subject: [PATCH 6/6] #68 Remove ecs leftovers from configs. --- grumphp.yml | 2 -- phpstan.neon | 13 ------------- 2 files changed, 15 deletions(-) diff --git a/grumphp.yml b/grumphp.yml index 4dfe1e1..8ad0a35 100755 --- a/grumphp.yml +++ b/grumphp.yml @@ -11,8 +11,6 @@ grumphp: php_stan: run_on: ['src'] configuration: phpstan.neon - ecs: - config: ecs.php yaml_lint: ~ json_lint: ~ phpunit: ~ diff --git a/phpstan.neon b/phpstan.neon index 9f085eb..24b94e0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,16 +9,3 @@ parameters: - '#Plugin manager has cache backend specified but does not declare cache tags.#' includes: - 'vendor/phpstan/phpstan-deprecation-rules/rules.neon' - - 'vendor/symplify/coding-standard/packages/cognitive-complexity/config/cognitive-complexity-services.neon' - -services: - - - class: Symplify\CodingStandard\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule - tags: [phpstan.rules.rule] - arguments: - maxMethodCognitiveComplexity: 16 - - - class: Symplify\CodingStandard\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule - tags: [phpstan.rules.rule] - arguments: - maxClassCognitiveComplexity: 50