Problem/Motivation

Phpstan gets confused when commit-code-check.sh runs against an MR that touches update-countries.sh. That file is listed as excluded in phpstan.neon.dist, but still gets passed to phpstan, so it gets analysed by the partial scan. Since t() in update-countries.sh has one parameter, but in bootstrap.inc takes 3 parameters, phpstan reports false-positive violations. This also confuses the needs review bot, which sends reviewable issues back to needs work.

Steps to reproduce

Create an MR that touches any file that calls t() with more than one argument, and also touches update-countries.sh

For example: https://www.drupal.org/files/issues/2026-10-06/3560682-nr-bot_kpcmc9rz.txt

Proposed resolution

Add the other params to the fake t() function.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#6 3628986-nr-bot_cwdkglgp.txt433 bytesneeds-review-queue-bot

Issue fork drupal-3628986

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

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
mstrelan’s picture

Issue summary: View changes
mstrelan’s picture

We could probably remove these lines from phpstan.neon.dist now?

    # Skip update countries script for fake t() declaration.
    - scripts/update-countries.sh
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new433 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.