The configuration events system is a bit unwieldy are does not provide important information. For example when the SAVE event is fired it is hard to find what data has actually changed. The event names are magic strings and there is no explicit event fired when config is renamed. Even worse, when config is renamed, overrides are not applied and when new configuration is created, overrides are not properly merged.
- adds an event interface so we can add further events easily
- provides a method to events to easily identify if a value changed
- provides a class of constants for event listeners so developers can easily use the system
- adds a rename event as currently no events are fired when this occurs
- fixes to apply overrides when renamed happen
- fixes to apply overrides when creating new configuration
- adds comprehensive tests for the events
Review patch. Commit.
User interface changes
1. Instead of the magic strings, use constants from the ConfigEvents class to identify events.
2. A new ConfigEvents::RENAME event is added and fired when a config object is renamed.
3. Config event implementations should implement/expect ConfigEventInterface.
4. A new changed() method is added to Config events so that certain value changes can be inspected/identified.
PASSED: [[SimpleTest]]: [MySQL] 64,332 pass(es). View
|#38||interdiff.txt||929 bytes||Gábor Hojtsy|
|#38||config_system_cleanup-2175917-38.patch||23.8 KB||Gábor Hojtsy|
PASSED: [[SimpleTest]]: [MySQL] 63,759 pass(es). View