Problem/Motivation

Both phpcs and phpstan jobs fail on every pipeline (visible on !14, !15). They are allow_failure: true so the pipeline shows green, but the failures are real.

  • PHPCS: Drupal.Files.LineLength.TooLong at ai_metering.views.inc:138. No phpcs.xml.dist at module root, so CI and local runs scope differently.
  • PHPStan: phpstan.neon includes vendor/mglaman/phpstan-drupal/extension.neon via %currentWorkingDirectory%. That path does not resolve inside a DrupalCI install — the job fails at bootstrap.

Steps to reproduce

  1. Open any recent MR pipeline (e.g. !15) and expand the job list.
  2. phpcs job: Drupal.Files.LineLength.TooLong at ai_metering.views.inc:138.
  3. phpstan job: fatal error loading vendor/mglaman/phpstan-drupal/extension.neon.

Environment

  • Drupal version: 10.3+ / 11.x
  • ai_metering version: 1.0.x-dev
  • AI provider module + version (e.g. ai_provider_anthropic 1.x): N/A
  • AI feature module tested (e.g. ai_translate, ai_chatbot, ai_assistant_api, ai_summarize...): N/A

Proposed resolution

  • Add phpcs.xml.dist at module root.
  • Fix line length violation at ai_metering.views.inc:138.
  • Remove the includes: block from phpstan.neon — the %currentWorkingDirectory%/vendor/... path does not resolve in DrupalCI. Other AI sub-modules (e.g. ai_provider_cloudflare_gateway) use the same approach.

Remaining tasks

  • Confirm both jobs green in CI after MR.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

AI assistance

AI-Generated: Yes (Claude, reviewed by @codeitwisely).

Comments

codeitwisely created an issue. See original summary.

codeitwisely’s picture

Status: Active » Fixed

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.