Part of #3641170: [meta] Call parent constructor instead of duplicating property assignment.

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.

Proposed resolution

In this issue, fix instances where the property is defined in the same class.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3641781

Command icon Show commands

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

mondrake created an issue. See original summary.

mondrake’s picture

Status: Needs review » Active
Issue tags: -Needs Review Queue Initiative
mondrake’s picture

Title: Refactor Component/Diff constructors for property promotion » Fix constructors for property promotion where the property is defined in the class
mondrake’s picture

Title: Fix constructors for property promotion where the property is defined in the class » Fix constructors for property promotion where the property is defined in the class - lib/Component

mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Assigned: Unassigned » mondrake
Status: Needs review » Needs work

Uhm test failures seem legit. On that

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review