Problem/Motivation

#3635402: Promote remaining properties in constructors and add @param docs where needed flagged up that we have several classes in core where instead of calling the parent constructor, the class assigns the property itself. For property promotion, it would be better to call the parent constructor (which can then do property promotion). This will also make it easier to handle adding readonly.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

mondrake’s picture

StatusFileSize
new3.84 KB
new2.84 KB

I asked LLM to write a script to identify the constructors that may be impacted. It developed the attached script, that uses nikic/php-parser to scan through the codebase, and run it to produce the attached results.

I think the script is currently missing many cases, but it looks like a starting point. I'll see into enhancing it humanly.