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
Although the class defines it as follows, it is not mandated by any of the interfaces it implements:
/**
* {@inheritdoc}
*/
public function isRequired() {
return FALSE;
}
Found in #2407801: Views generic field handler does not work with base fields.
Proposed resolution
Remove it once #2407801: Views generic field handler does not work with base fields lands. If there are no further fails, that that should be easy.
Remaining tasks
Do it.
User interface changes
None.
API changes
None. This method is not expected to be exposed by Field storage configuration.
Comment | File | Size | Author |
---|---|---|---|
#4 | remove-isrequired-2411323-4.patch | 673 bytes | tadityar |
Comments
Comment #1
yched CreditAttribution: yched commentedThat looks like the remnants of some past back and forth dance about definition structures.
#2390495: Support marking field storage definitions as required does intend to introduce support for isRequired() on the storage level at some point. But meanwhile, yeah the current situation is weird.
Comment #2
tadityar CreditAttribution: tadityar commentedPostponed until #2407801: Views generic field handler does not work with base fields lands~
Comment #3
tadityar CreditAttribution: tadityar commentedThat one landed.
Comment #4
tadityar CreditAttribution: tadityar commentedComment #5
yched CreditAttribution: yched commentedThanks @tadityar.
#2390495: Support marking field storage definitions as required might reevaluate this, but for now let's be consistent - FieldStorage does not carry requiredness.
Comment #6
Gábor HojtsyHa, the reason I opened this followup to #2407801: Views generic field handler does not work with base fields was I was expecting this to blow up somewhere, but looks like the only place that used this was there. Cool. Agreed with RTBC.
Comment #7
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 82fad36 and pushed to 8.0.x. Thanks!