Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Assignment plugins may set configuration as optional, but when generating the Features package modules dependencies get set to packages containing a configuration item's dependencies.
This is occurring due to FeaturesManager::assignInterPackageDependencies
processing all config items as if they are required and setting dependencies to the packages.
Comment | File | Size | Author |
---|---|---|---|
#7 | features-optional-dependency-2902966-6.patch | 5.6 KB | nedjo |
| |||
#4 | features-optional-dependency-2902966-4-tests-only.patch | 4.37 KB | nedjo |
#2 | features-inter_package_dependencies-2902966-2.patch | 847 bytes | kerasai |
Comments
Comment #2
kerasai CreditAttribution: kerasai at Palantir.net commentedAttached is a patch to address the issue.
I'm not too fond of breaking out of
foreach
loops, but this is probably the simplest/safest solution.It would be great to refactor this a bit into smaller, easier to digest (and test) methods but that's beyond the scope of fixing this.
Comment #3
nedjoThanks, this looks good.
We should update the tests to cover this bug. That should be relatively straightforward, starting with setting the subdirectory for items in
FeaturesManagerTest::getAssignInterPackageDependenciesConfigCollection()
.Comment #4
nedjoHere's a tests-only patch that should fail.
Comment #6
nedjoAnd with a fix.
#2 was testing the dependent item for
InstallStorage::CONFIG_OPTIONAL_DIRECTORY
. However, it's the other side of the dependency that we need to test. We add the dependency only if the required config item is inInstallStorage::CONFIG_INSTALL_DIRECTORY
.Comment #7
nedjoComment #9
nedjo