Problem/Motivation

Since we're using readonly properties in attribute plugin discovery we can use readonly classes instead. This is supported in PHP 8.2+ so this would be restricted to 11.x.

Not sure how to handle BC since the base classes would be readonly and all child classes would also need to be as well.

There are also a handful of properties that are not declared readonly, but this might not matter since I'm not sure their values are actually set on the objects.

Steps to reproduce

Proposed resolution

Remaining tasks

This might not be possible due to the provider and class properties on AttributeBase. Leaving open in case anyone else has bright ideas.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3440949

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

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
mstrelan’s picture

Status: Needs review » Needs work

This might not be possible due to the provider and class properties on AttributeBase. Leaving open in case anyone else has bright ideas.

mstrelan’s picture

Issue summary: View changes
quietone’s picture

Title: [11.x] Use readonly classes for attribute plugin discovery » Use readonly classes for attribute plugin discovery
Issue tags: +Major version only

This is no longer 11.x

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.