Rename EntityReferenceTestTrait to help discoverability

Created on 13 November 2023, almost 2 years ago
Updated 23 November 2023, almost 2 years ago

Problem/Motivation

Core has several test traits which help with setup, e.g.

- Drupal\Tests\media\Traits\MediaTypeCreationTrait
- Drupal\Tests\node\Traits\NodeCreationTrait
- Drupal\Tests\image\Kernel\ImageFieldCreationTrait

These generally follow the pattern of ending in 'CreationTrait'. This helps developers identify them as reusable in their own tests, and automated tools such as Module Builder can find them and suggest them when generating test classes.

EntityReferenceTestTrait is a reusable trait for creating entity reference fields, but it does not follow this pattern.

Steps to reproduce

Proposed resolution

Rename the trait to EntityReferenceFieldCreationTrait.

Determine whether a deprecation notice is necessary for the existing trait or whether it can just be removed.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.2

Component
Field 

Last updated 29 days ago

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024