Problem/Motivation

EntityReferenceItemInterface::getReferenceableBundles() was introduced in #3057545: ResourceTypeRepository wrongly assumes that all entity reference fields have the setting "target_type" and deprecates entity reference fields that do not implement this interface; they must do so in Drupal 10.

This issue is a follow-up as foreseen in the original issue, to update any places in core where the field's settings are directly accessed, e.g. to determine the target_type. This will also improve compatibility with other field types, e.g. Dynamic Entity Reference.

ContentEntityBase::referencedEntities() will need updating, as it does:

> $property instanceof EntityReference

And generally, we should look through the whole codebase for anything which references either the EntityReference or EntityReferenceItem classes, or the entity_reference field type, and update them.

That could all be done in follow-ups though.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bradjones1 created an issue. See original summary.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wim leers’s picture

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.