Problem/Motivation

The phpcs job is not allow_failure, so the pipeline is red on 44 errors, all Generic.Strings.UnnecessaryStringConcat.Found ("String concat is not required here; use a single string instead"):

  • PHPCS — 44 UnnecessaryStringConcat errors across 7 files, with per-file counts, plus the note that phpcbf can't fix this sniff and that CI falls back to the template's default ruleset since there's no phpcs.xml.dist. This is the one that actually turns the pipeline red.
  • PHPStan — 15 errors at level 1, itemized by message and file. Flagged as non-blocking (allow_failure: true), with a note that the possibly-undefined-variable ones look like real control-flow gaps rather than baseline fodder.

Proposed resolution

Fix the errors rather than baseline them. Get phpcs to zero so the pipeline is green, then clear the PHPStan errors and trim phpstan-baseline.neon to match.

Remaining tasks

  • Replace the unnecessary string concatenations with single strings (44).
  • Fix the PHPStan errors; keep the baseline only for what genuinely cannot be fixed.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joelpittet created an issue. See original summary.

  • joelpittet committed 40017ea2 on 4.x
    task: #3617084 Fix the PHPCS and PHPStan errors reported by GitLab CI
    
joelpittet’s picture

Status: Active » Fixed

All sorted, merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.