Problem/Motivation
An existing feature may have configuration in config/optional. When the feature is regenerated, the optional items will be moved from config/optional to config/install (unless the optional package assignmeent plugin is configured such that the configuration type is optional).
Proposed resolution
We have an existing method that lists existing extension-provided configuration by directory, FeaturesExtensionStorages::listAllByDirectory()
. Unfortunately, it's a protected method and is in a class that implements an interface. So:
Add a new class, FeaturesExtensionStoragesByDirectory
, that extends FeaturesExtensionStorages
and has a public method ::listAllByDirectory()
. Also define an accompanying interface.
Call this method to determine the current location of extension-provided config and use that as the default when initializing config items.
Remaining tasks
Write test coverage.
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff.txt | 984 bytes | nedjo |
#4 | features-optional-directory-2943737-4.patch | 4.15 KB | nedjo |
|
Comments
Comment #2
nedjoComment #4
nedjoRemoving null coalescing operator, which requires PHP 7.
Comment #5
nedjoThe basic functionality in the class we're replacing - that we can define custom config-providing deirectories - would better be provided by Configuration Update Manager, see #2633480: Add functionality for external storage. But meantime it might be worth fixing this bug here.
Comment #7
nedjoApplied to fix the bug. Setting back to active pending tests.
Comment #8
nedjoWell, maybe better to mark this fixed and move tests to a new issue, #2998330: Test coverage for optional configuration reassigned to config/install.