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.
Once #2368807: Remove special support for NULL values in FieldItemList is in, there is no runtime case where ItemList::$list can ever *not* be set.
A lot of if (isset($this->list))
checks in ItemList / FieldItemList can be removed.
Beta phase evaluation
Issue category | Dead code removal and followup of critical |
---|---|
Issue priority | Normal: because, well, not major :-) |
Disruption | None, just better understandability and maintainability |
Comment | File | Size | Author |
---|---|---|---|
#9 | 2392805-ItemList_cleanup_isset-9.patch | 7.39 KB | yched |
#4 | interdiff.txt | 1.17 KB | yched |
#4 | 2392805-ItemList_cleanup_isset-4.patch | 7.79 KB | yched |
#3 | 2392805-ItemList_cleanup_isset-3.patch | 7.14 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedPostponed on #2368807: Remove special support for NULL values in FieldItemList
Comment #2
yched CreditAttribution: yched commented#2368807: Remove special support for NULL values in FieldItemList is in
Comment #3
yched CreditAttribution: yched commentedPatch.
Comment #4
yched CreditAttribution: yched commentedWhile we're in there, the doc for the $list class member could be updated for our current practices.
Comment #8
yched CreditAttribution: yched commentedGreen at last :-)
Comment #9
yched CreditAttribution: yched commentedReroll after #2381777: Unify setValue() implementations in ItemList & FieldItemList
Comment #10
yched CreditAttribution: yched commentedAdded Beta phase evaluation
Comment #11
amateescu CreditAttribution: amateescu commentedLooks great to me. I've seen in other issues that "dead code" is considered a bug, but I will let core committers make that decision if it's true.
Comment #12
alexpottRemoving dead code is fixing a bug - we have less complexity too and this is a followup of a critical.
Committed 4f1de4e and pushed to 8.0.x. Thanks!