Problem/Motivation

The PHPStan job in the current 8.x-1.x baseline fails as an allowed failure, so the pipeline reports passed with warnings. The existing automated Drupal 12 compatibility issue #3594952 is broad, bot-managed, currently conflicted, and explicitly recommends a separate human branch for refinements; this issue is limited to the current PHPStan job.

Exact CI findings

Pipeline 911674, job 11344550 reports 10 errors:

  • comment_notify.inc:168: deprecated user_load_by_mail().
  • comment_notify.migrate.inc:11: unknown MigrateDestinationHandler class.
  • comment_notify.migrate.inc:17: undefined registerTypes() method.
  • comment_notify.module:407: deprecated user_load_by_name().
  • src/Form/CommentNotifySettings.php:108 and tests/src/Functional/CommentNotifyConfigPageTest.php:171: deprecated CommentInterface::ANONYMOUS_MAYNOT_CONTACT.
  • tests/src/Functional/CommentNotifyNotificationsTest.php:123 and :212: deprecated CommentItemInterface::OPEN.
  • tests/src/Functional/CommentNotifyNotificationsTest.php:214 and tests/src/Functional/CommentNotifyTestBase.php:65: deprecated CommentInterface::ANONYMOUS_MAY_CONTACT.

Proposed resolution

Replace deprecated user loaders with user storage queries; use Drupal 11.4 replacement enums through the supported backwards-compatibility helper so Drupal 10 remains supported; and make legacy migration integration discoverable to static analysis without changing runtime behavior.

Testing instructions

  1. Run PHPStan with the Drupal GitLab template configuration and no baseline exclusions.
  2. Run the complete Comment Notify test suite on the supported Drupal version.
  3. Confirm the PHPStan CI job passes.

Relevant CI and issues

AI use disclosure

AI-Generated: Yes. OpenAI Codex was used to inspect the current CI output, draft this issue, and will assist with implementation and verification. All changes and test results will be reviewed by a human before merge.

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

gnuget created an issue. See original summary.

gnuget’s picture

Status: Active » Needs review

Validation complete.

Merge request: https://git.drupalcode.org/project/comment_notify/-/merge_requests/23
Pipeline: https://git.drupalcode.org/project/comment_notify/-/pipelines/911697
Targeted PHPStan job: https://git.drupalcode.org/project/comment_notify/-/jobs/11344758 — passed.

The complete Comment Notify test directory was also run locally in DDEV and completed successfully. No merge was performed.

AI-Generated: Yes. OpenAI Codex assisted with implementation, test execution, CI inspection, and drafting this validation update. The change remains subject to human review before merge.

  • gnuget committed 0c31e1ef on 8.x-1.x
    task: #3614940 Resolve PHPStan findings in Comment Notify CI
    
    By: gnuget
    
gnuget’s picture

Status: Needs review » 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.