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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

FileSize
3.02 KB

To start with, I think we can do this.

damiankloip’s picture

Status: Active » Needs review
FileSize
3.02 KB
1.32 KB

Whoops, sorry!

The last submitted patch, 2: 2160495-2.patch, failed testing.

damiankloip’s picture

So we could get into issues with class KeyValueExpirableFactory extends KeyValueFactory {

Berdir’s picture

(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

damiankloip’s picture

FileSize
5.76 KB
2.74 KB

In 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).

The last submitted patch, 6: 2160495-6.patch, failed testing.

sun’s picture

6: 2160495-6.patch queued for re-testing.

sun’s picture

Status: Needs review » Reviewed & tested by the community
xjm’s picture

6: 2160495-6.patch queued for re-testing.

damiankloip’s picture

6: 2160495-6.patch queued for re-testing.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.