Problem/Motivation
Almost every implementation of Configuration::alterDependecies() contains something like this
if (empty($stack[$identifier])) {
// Include dependencies here
$stack[$newDependency->getUniqueId()] = $newDependency;
}
This introduces an interesting issue. In certain cases, a configuration can be created, but don't include all the required dependencies for a certain configuration.
For example, in text formats, two different Configurations could required a certain permission. Like a wysiwyg and a permission. If the wysiwyg creates the text format, the permission will not include the text format as its dependency. And therefore, the permission will always appear as overridden.
Proposed resolution
Modify all the occurrences of Configuration::alterDependencies() to re-use the configuration created in a cache of configurations (that doesn't exists yet). If the stack contains an object, modify that object with the new dependency.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1908048.config-dependencies.4.patch | 22.34 KB | dagmar |
| #2 | 1908048.config-dependencies.2.patch | 22.28 KB | dagmar |
| #1 | 1908048.config-dependencies.1.patch | 15.59 KB | dagmar |
Comments
Comment #1
dagmarComment #2
dagmarSome clean-up.
Comment #4
dagmarComment #5
dagmarCommitted & Pushed to 7.x-2.x.