EntityField::getFieldStorageDefinition() should throw an exception when it can't return a field storage

Created on 27 November 2023, 10 months ago
Updated 18 March 2024, 6 months ago

Problem/Motivation

\Drupal\views\Plugin\views\field\EntityField::getFieldStorageDefinition() potentially can return a NULL value. In normal views operation this should never occur as you shouldn't be able to configure an entity field that this cannot return a storage for. Therefore returning NULL is incorrect - and none of the places where it is used expect that. So we should trigger a helpful exception that details what we can't find a field storage for.

Proposed resolution

See above.

Remaining tasks

User interface changes

None

API changes

New exception triggered from \Drupal\views\Plugin\views\field\EntityField::getFieldStorageDefinition() - not actually new API because if this does return a NULL atm it will cause a PHP error.

Data model changes

None

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
ViewsΒ  β†’

Last updated 14 minutes ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024