Add support for class constants visibility

Created on 23 December 2021, over 2 years ago
Updated 30 April 2023, about 1 year ago

Problem/Motivation

PHP 7.4 and above allow defining visibility (public/protected/private) for class constants, but coder rejects them with

 FILE: .../www/html/core/lib/Drupal/Component/Attribute/AttributeArray.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 33 | ERROR | Class constants must be uppercase; expected PROTECTED
    |       | but found protected
---------------------------------------------------------------------- 

Steps to reproduce

Proposed resolution

Allow constant visibility, will be relevant in Drupal 10.

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Fixed

Version

3.0

Component

Coder Sniffer

Created by

🇮🇹Italy mondrake 🇮🇹

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024