Closed (fixed)
Project:
Coder
Version:
9.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2025 at 14:33 UTC
Updated:
21 Dec 2025 at 16:54 UTC
Jump to comment: Most recent
When using asymmetric visibility for a class property declaration in PHP 8.4, I discovered that PHPCS always reports the following error:
Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
Create the following file, then run phpcs -s --standard=Drupal,DrupalPractice on it:
<?php
/**
* @file
* This is a test comment.
*/
return new class() {
/**
* This is a test comment.
*
* @var array
*/
public private(set) array $data = [];
};
You should see the superfluous error message from above, even though there is a doc comment.
TBD.
TBD.
n/a?
n/a?
n/a?
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 #5
klausiMerged a fix into 9.x, thanks for reporting!