Skip to content

Re-add back ecs and code complexity for D10 #72

Closed

Description

@hkirsman

These were removed here https://github.com/wunderio/code-quality/pull/71/files because we were not able to upgrade ECS on D9.

Activity

  1. added a commit that references this issue on May 26, 2023
  2. hkirsman commented on May 26, 2023

    @hkirsman
    ContributorAuthor

    Probably this is needed:

        "wunderio/ecs-drupal": "^1.0",
        "symplify/coding-standard": "^11.3",
    

    Or at least let's start from latest 11.3.

    Then we also need to change that requirement here:

    https://github.com/wunderio/ecs-drupal/blob/master/composer.json

    Related issue at wunderio/ecs-drupal#2

  3. added 2 commits that reference this issue on May 27, 2023
  4. hkirsman commented on May 27, 2023

    @hkirsman
    ContributorAuthor

    Cognitive complexity used to need these lines

    
    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
    

    It's yelling:
    Service (Symplify\CodingStandard\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule::__construct()): Class 'Symplify\CodingStandard\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule' not found.

    But seems they don't exist anymore and this might be the reason. New package is needed.

    https://github.com/symplify/symplify/pull/4515

  5. hkirsman commented on May 27, 2023

    @hkirsman
    ContributorAuthor

    It might be even as simple as this to add back the cognitive complexity:

    https://github.com/TomasVotruba/cognitive-complexity

  6. hkirsman commented on May 27, 2023

    @hkirsman
    ContributorAuthor

    Seems to work great:
    image

  7. added 9 commits that reference this issue on May 29, 2023
  8. added a commit that references this issue on Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions