Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When working on #2280639: Add the FieldStorageDefinition class to define field storage definitions in hook_entity_field_storage_info(), I think I found some dead code in BaseFieldDefinition
. The comment responding to feedback in the original review contained in #2144327: Make all field types provide a schema(), seems to indicate it's necessary, but I can't seem to find a way to reproduce and removing it doesn't seem to break anything.
Proposed resolution
Remove the dead code.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | 3014773-8.patch | 1.59 KB | Sam152 |
#8 | interdiff.txt | 818 bytes | Sam152 |
#2 | 3014773-2.patch | 808 bytes | Sam152 |
Comments
Comment #2
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #3
joachim CreditAttribution: joachim as a volunteer commentedAre there any calls to key() in lib/Drupal/Core/Field that look like they do what this says?
Comment #4
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedThe method returns a copy of the array, so calls to key() don't actually change the pointer of the array like the comment suggests.
Comment #5
joachim CreditAttribution: joachim as a volunteer commentedOk thanks for the explanation.
In that case, looks good to go.
Comment #6
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedThanks for reviewing! :)
Comment #7
alexpottLet's update \Drupal\field\Entity\FieldStorageConfig::getColumns() at the same time then.
Comment #8
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedGood catch, didn't see that there.
Comment #9
joachim CreditAttribution: joachim as a volunteer commentedComment #10
catchCommitted c76c37b and pushed to 8.7.x. Thanks!