- 🇩🇪Germany donquixote
Quick note: We can use
class_alias()
to reduce the BC impact of renaming a class.
https://3v4l.org/80D6AIt does _not_ help us with renaming methods, but we can find other solutions for that.
@yched :
CacheableMetadata trips me up each time as implying that it is "metadata that you can cache". Rather, it's the metadata describing the "cacheability of something" --> CacheabilityMetadata would be more accurate ?
@Wim Leers :
Dear god thank you yes!!!!!!!
I discussed this with catch almost 2 months ago and he agreed we should rename CacheableMetadata to Cacheability. I fear it's too late now though :(
@yched :
Yeah :-/ Given the importance render cache has in D8 (currently and even more after SmartCache), and the fact that it's ... complex enough ;-) (see the discussions in #2556889: [policy, no patch] Decide if SmartCache is still in scope for 8.0 and whether remaining risks require additional mitigation → ), I'd think not having misleading names add to the complexity is worth the disruption. I'll create the issue and ask for release manager feedback.
In short :
The render cache and "things providing the right cacheability information" is shaping up to be one of the critical concepts to grasp in D8. Yet our central class for that, "metadata about the cacheability of something", has a name that gives you the wrong idea about what it is. That doesn't really help building and keeping a good mental model, since you have to mentally translate whenever you read / write code dealing with those :-)
Rename CacheableMetadata to
- CacheabilityMetadata
- just Cacheability ?
That is late for a BC breaking API change, obviously. Not sure whether how large the potentially impacted code might be though.
Alternatively, we could keep a legacy/deprecated "CacheableMetadata extends [NewBetterName]" around for BC, and move our onternal code to the more accurate [NewBetterName] ?
Release manager feedback needed
Needs work
11.0 🔥
Enhances developer experience.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Quick note: We can use class_alias()
to reduce the BC impact of renaming a class.
https://3v4l.org/80D6A
It does _not_ help us with renaming methods, but we can find other solutions for that.