Regression in 8.3.19 for variadic function parameters

Created on 10 June 2023, about 1 year ago
Updated 15 June 2023, about 1 year ago

Problem/Motivation

Looks like πŸ› `Drupal.Commenting.FunctionComment.InvalidReturn` breaks on intersection return type annotations Fixed introduced a regression for variadic function parameters.

Steps to reproduce

Look at a recent updated deps QA run at https://www.drupal.org/node/3060/qa β†’ .
These runs update all core dependencies to the latest possible releases, so it uses Coder 8.3.19, where the "normal" test runs are still on 8.3.18.

Clicking on an updated deps QA run reveals 2 PHPCS failures that weren't there with 8.3.18:

FILE: /var/www/html/core/lib/Drupal/Core/Template/TwigExtension.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 735 | ERROR | Parameter $classes is not described in comment
     |       | (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
----------------------------------------------------------------------


FILE: ...tension/Plugin/Validation/Constraint/ExtensionNameConstraint.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 20 | ERROR | Parameter $arguments is not described in comment
    |       | (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
----------------------------------------------------------------------

Proposed resolution

Looks like the addition of these lines https://github.com/pfrenssen/coder/commit/5a1779e6918b1854f7efe4473ecc6c... in the IF should also be incorporated in the IF down at lines https://github.com/pfrenssen/coder/blob/8.3.x/coder_sniffer/Drupal/Sniff...


https://github.com/pfrenssen/coder/pull/202

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

8.3

Component

Coder Sniffer

Created by

πŸ‡³πŸ‡±Netherlands Spokje

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

Comments & Activities

Production build 0.69.0 2024