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.
I was looking at the number of abstract classes that are suffixed with Base (like PluginBase, ConfigEntityBase, AttributeValueBase) and I noticed that there is only one Drupal abstract class that is prefixed with Abstract.
Then I thought, maybe it's a coincidence, and the name actually means something. But there is no class docblock, so it's NOT clear why it's named that.
Furthermore, DatabaseStorage extends it, but MemoryStorage does not, due to "performance reasons".
So, let's document the class and consider renaming it to StorageBase to match the rest of core.
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal-1798420-5.patch | 2.2 KB | tim.plunkett |
#2 | drupal-1798420-2.patch | 2.17 KB | tim.plunkett |
#1 | drupal-1798420-1.patch | 2.16 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettI spoke with chx about this in IRC, he confirmed that the 'Abstract' in 'AbstractStorage' bore no significance.
Added the missing docblock and renamed the file.
Comment #2
tim.plunkettAfter uploading that, I noticed that elsewhere it's "key/value" not "key-value".
Comment #3
chx CreditAttribution: chx commentedSure.
Comment #4
BerdirShouldn't this be the fully namespaced name here like all other class references?
Comment #5
tim.plunkettFair enough.
Comment #6
BerdirGood, RTBC again.
Comment #7
webchickSeems sensible to me.
Committed and pushed to 8.x. Thanks!