Phpstan: Function t invoked with 3 parameters, 1-2 required.

Created on 5 December 2023, 7 months ago

Problem/Motivation

PHPStan code checks fail because it thinks that the t() function only allows 2 params instead of 3. Drupal core allows 3 parameters, potx allows 2 parameters in t().

Steps to reproduce

Run PHPstan code check on a file that has t() with 3 parameters while potx is installed. It will fail because it picks up the t() signature of potx.

Proposed resolution

Add a third unused parameter to potx's t() function in potx.inc:3355.

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium Fernly

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024