Problem / Motivation

The project currently does not fully comply with the coding standards enforced by PHPCS.
Ensuring consistent code style improves readability, maintainability, and reduces the risk of introducing subtle bugs.

Proposed Resolution
• Review the current PHPCS configuration.
• Fix or refactor code to comply with the defined coding standards.
• Update the PHPCS configuration file if necessary to enforce the standards consistently.
• Ensure that the CI pipeline runs PHPCS and passes without errors.

Acceptance Criteria
• PHPCS reports no violations in the codebase.
• Code adheres to the agreed-upon coding standards.
• The CI pipeline passes successfully with PHPCS checks.

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

teebeecoder created an issue. See original summary.

donquixote made their first commit to this issue’s fork.

donquixote’s picture

Related issues: +#3541994: Fix CI
donquixote’s picture

Status: Active » Needs review

Btw the unused import we may have to restore later, when we inject the service.
But that's ok.

Pipeline passes for phpcs.
The phpcs check is set to required already:

phpcs:
  allow_failure: false
donquixote’s picture

The MR is super unimpressive, and that is how it should be :)

donquixote’s picture

Review the current PHPCS configuration.
[..]
Update the PHPCS configuration file if necessary to enforce the standards consistently.
[..]
Code adheres to the agreed-upon coding standards.

It is using the default phpcs rules used for all projects.
We don't have custom phpcs rules for this module.

Fix or refactor code to comply with the defined coding standards.
[..]
Ensure that the CI pipeline runs PHPCS and passes without errors.
[..]
PHPCS reports no violations in the codebase.
[..]
The CI pipeline passes successfully with PHPCS checks.

done :)

Ensure that the CI pipeline runs PHPCS

We can see in upstream pipeline that phpcs runs and fails..

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I reviewed MR!86, and confirmed that the PHPCS is now passed on the Gitlab CI.

Moving this to RTBC.
Thank you.

fmb made their first commit to this issue’s fork.

  • fmb committed 98463700 on 3.0.x authored by donquixote
    Issue #3553022: Remove unused import.
    
    (This was originally proposed as...

  • fmb committed f25c13aa on 3.0.x authored by donquixote
    Issue #3553022: Fix line breaks.
    
    (This was originally proposed as part...
fmb’s picture

Are you still going to work on this issue about PHPCS CI failures, or can we mark it as fixed?

donquixote’s picture

Status: Reviewed & tested by the community » Fixed

phpcs is green, the scope of this issue is complete.

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.