Numerical Views.yaml produce broken merged ViewsConfiguration
Initiator: Marc Neuhaus
When you use non-named
ViewConfigurations with multiple packages you can end up with broken configurations because the view configurations get merged by numerical index. Example: <link https: gist.github.com mneuhaus>
gist.github.com/mneuhaus/6389661Possible discussions:- should we update the documentation to advice the user to only use named view configurations
- or should we update/change the ViewConfigurationManager to append instead of override the toplevel index
Conclusion:
The nice solution would be a refactoring of the current
ConfigurationManager, so that it only knows two processing types: One that merges all configurations recursively (e.g. for
Settings.yaml) and one that appends all configurations (e.g. for
Routes.yaml). Then the special handling that is currently done in the ConfigurationManager should be extracted to some configurable
ConfigurationPostProcessor.
As this would mean quite some work we will add a new
CONFIGURATION_PROCESSING_TYPE_* constant for now that does not merge the configuration recursively but appends everything in the correct order (according to package dependencies).
The
*Views* configuration type will then be registered with that new processing type in Flow\Package.php:
$configurationManager->registerConfigurationType('Views', ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_<to_be_named>);
Marc will push a changeset.