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.
Updated: Comment #N
Problem/Motivation
The KeyValueDatabaseExpirableFactory and KeyValueNullExpirableFactory classes currently implement the KeyValueFactoryInterface. This is not correct as these factories should be returning KeyValueStoreExpirableInterface instances and not KeyValueStoreInterface instances.
Proposed resolution
Add a KeyValueExpirableFactoryInterface, so the factories mentioned above can implement this instead.
Remaining tasks
Patch, reviews.
User interface changes
None
API changes
Addition of KeyValueExpirableFactoryInterface.
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-2160495-6.txt | 2.74 KB | damiankloip |
#6 | 2160495-6.patch | 5.76 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedTo start with, I think we can do this.
Comment #2
damiankloip CreditAttribution: damiankloip commentedWhoops, sorry!
Comment #4
damiankloip CreditAttribution: damiankloip commentedSo we could get into issues with
class KeyValueExpirableFactory extends KeyValueFactory {
Comment #5
Berdir(05:09:39 PM) berdir: damiankloip: we just need to update the type hint in FormBuilder
(05:10:04 PM) berdir: damiankloip: it has keyvalue.expirable as argument, so it needs to use that interface
(05:10:19 PM) berdir: damiankloip: probably only works otherwise because KeyValueDatabaseExpirableFactory implements both
Comment #6
damiankloip CreditAttribution: damiankloip commentedIn the patch in #2 I changed the KeyValueDatabaseExpirableFactory to not extend the KeyValueFactory. So now it should only implement the KeyValueDatabaseExpirableFactoryInterface.
So you're just saying we should do this? (So the KeyValueExpirableFactory extends KeyValueFactory and implements KeyValueExpirableFactoryInterface, both just having the get() method).
Comment #8
sun6: 2160495-6.patch queued for re-testing.
Comment #9
sunComment #10
xjm6: 2160495-6.patch queued for re-testing.
Comment #11
damiankloip CreditAttribution: damiankloip commented6: 2160495-6.patch queued for re-testing.
Comment #12
catchCommitted/pushed to 8.x, thanks!