Drop local var $class in Element*getInfo() methods, use static::class directly

Created on 21 December 2024, about 7 hours ago

Problem/Motivation

In a lot of element types, we have `$class = static::class`.
Then we use that variable for callbacks like `[$class, 'processDatelist']`.
The static::class was introduced in #2619482: Convert all get_called_class()/get_class() to static:: .

Problem:
PhpStorm, and perhaps other tools and IDEs, don't recognize `[$class, 'method']` as a callback for the sake of "go to declaration" or "find usages".
(For PhpStan I am not sure)

Steps to reproduce

Proposed resolution

Drop the local variable $class, inline the static::class calls.

(For now the scope shall be just those ::getInfo() methods as there it seems a common pattern.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

render system

Created by

🇩🇪Germany donquixote

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024