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.
Second issue from the DAT initiative :)
Found this stray @todo while working on #1503314: Remove the concept of active / inactive (field types, storage) from Field API:
function field_info_cache_clear() {
...
// @todo: Remove this when field_attach_*_bundle() bundle management
// functions are moved to the entity API.
entity_info_cache_clear();
...
}
Seems like this should've been handled in #1374116: Move bundle CRUD API out of Field API
Comment | File | Size | Author |
---|---|---|---|
#7 | 2148723-7.patch | 1.55 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedLet's see what breaks.
Comment #2
amateescu CreditAttribution: amateescu commentedAhem.
Comment #4
yched CreditAttribution: yched commentedWe currently still need that entity_info_cache_clear() call, not for the reason mentioned in the @todo :-/, but because configurable field/instance definitions are currently cached in both field.module's FieldInfo and EntityManager::getFieldDefinitions()...
That's for #2116363: Unified repository of field definitions (cache + API) to sort out.
Comment #5
amateescu CreditAttribution: amateescu commentedRight, so.. should we change this patch to only add a reference to that issue or just post a comment there and close this one?
Comment #6
yched CreditAttribution: yched commentedHmm...
What would make sense to cleanup in field_info_cache_clear() right now would be:
- the three drupal_static_reset() refer to old/obsolete stuff, they could be removed (not fully sure about 'field_available_languages', but worth a try
- typedData()->clearCachedDefinitions() & 'plugin.manager.field.field_type'->clearCachedDefinitions() should move to entity_info_cache_clear(), now that the notion of "field types" belongs to the Core entity/field system.
- the @todo above entity_info_cache_clear() should indeed point to #2116363: Unified repository of field definitions (cache + API)
- FieldInfo()->flush() stays
Comment #7
amateescu CreditAttribution: amateescu commentedfield_available_languages() seems to be called only in two tests which should probably be refactored at some point. So yeah, let's try.
Since we're not fixing the @todo anymore, I'll remove the tag :(
Comment #9
yched CreditAttribution: yched commentedProbably doesn't explain the fails, but shouldn't this stay in field_info_cache_clear() for now ? (field_info is about the things stored in config)
Comment #10
amateescu CreditAttribution: amateescu commentedI looked a bit at the test failures and it seems that typed_data and field_type cache clears are not yet ready to be moved, and 'field_available_languages' cannot to be removed as well.
Since a patch that just removes the other two static resets doesn't bring too much value at this point, I'll just postpone this cleanup.
Comment #11
mgiffordSince we are at Beta1 is it a good time for the cleanup?
Comment #12
BerdirNo, too late unfortunately. Because this function no longer exists :)
Comment #13
mgiffordThanks for closing the issue.