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.
The installer contains a smart hack to temporarily override $settings to use the KeyValueMemoryFactory instead of the default database factory implementation.
This override and temporary adjustment (and rollback) of $settings can be avoided by registering the KeyValueMemoryFactory directly in the service container.
Doing so reveals that the KeyValueFactory service is swappable, but some other services are using type-hints that explicitly ask for the default implementation. Hence, we need to add an interface for the factory service.
Comment | File | Size | Author |
---|---|---|---|
drupal8.keyvaluefactoryinterface.0.patch | 11.56 KB | sun | |
Comments
Comment #1
sunComment #2
jibranSeems simple enough so RTBC.
Comment #3
andypost+1 rtbc here
Comment #4
sunThis fix blocks #2155701: Installer starts with fatal error/exception "table 'semaphore' not found" if settings.php contains $databases already
(merging this patch into that patch fixes all test failures)
Comment #5
Dries CreditAttribution: Dries commentedNice clean-up. Committed to 8.x.
Comment #6
BerdirThis uses the same interface for the expirable key value store, that returns a different interface. See #2160495: Add a KeyValueExpirableFactoryInterface.