The 1.1.x pipeline is red due to pre-existing issues unrelated to any single feature. Splitting them out so feature MRs stay green and reviewable.
PHPCS
- ai_search_block.module — missing @file docblock (it sits below the use statements; must come first). phpcbf auto-fixes.
- modules/ai_search_block_log/ai_search_block_log.module:11 — unused use Drupal\Core\Render\Element;. phpcbf auto-fixes.
PHPStan (level 5)
- modules/ai_search_block_log_tag/src/Hook/AiSearchBlockLogTagHooks.php:87,91 — $entity->original / $entity->get() on a bare EntityInterface. $entity->original is also deprecated in Drupal 11.2 (removed in 12.0). Fix: narrow with instanceof ContentEntityInterface and use $entity->getOriginal().
PHPUnit (CI)
- Job fails with Unknown option "--verbose" — PHPUnit 11 removed the flag, so tests never run. Drop --verbose from the CI config / update the GitLab template ref.
Done when: phpcs, phpstan, and phpunit all pass green on 1.1.x.
Issue fork ai_search_block-3609906
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
Comment #2
nikro commentedComment #4
nikro commentedSetting for needs review:
Assigning to Abhisek, cuuuz as he rightfully pointed out that these changes need their own issue ^_^
Comment #5
abhisekmazumdarReviewed MR !45 against all 4 warning categories. I have also checked out the branch and re-run the checks locally in DDEV.
Per-category check
@filedocblock: now sits before theusestatements inai_search_block.module. Correct.use Drupal\Core\Render\Element;is gone fromai_search_block_log.module. I grepped the file forElementafter the removal, nothing left, so it's safe.AiSearchBlockLogTagHooks.php: theinstanceof ContentEntityInterfacenarrowing fixes the->get()calls. Theversion_compare()gate betweengetOriginal()(11.2+) and$entity->originalis needed, not optional, since the module still supports core^10.2andgetOriginal()doesn't exist before 11.2. Behavior is unchanged: this is a content entity, so$original instanceof ContentEntityInterfaceand the old!== NULLcheck are equivalent here.--verbose:_PHPUNIT_EXTRAis emptied in.gitlab-ci.yml. PHPUnit 11 dropped the flag, so removing it is the right fix rather than pinning a template ref.Local check (DDEV, PHP 8.4)
$current_month_startinAiSearchBlockLogController.php, a permission suggestion inai_search_block_log.routing.yml), out of scope for this issue.AiSearchBlockHelperGuardrailTestlanded in a later commit on 1.1.x, and the merged-results pipeline #887056 already ran it green.Diff is 4 files, nothing outside the issue scope.
I'm marking this as RTBC.
Comment #6
abhisekmazumdarComment #7
abhisekmazumdarComment #8
nikro commentedMerged into 1.1.x.