-
David Mudrák authored
Plugin info objects are owned by the plugin manager (composition pattern). Even if the plugin manager is a singleton, we need to keep explicit reference to the plugin manager that owns the plugin info so that we can mock up things in unit tests. Therefore this patch introduces a new property of plugin info objects that holds the reference to the instance of the plugin manager that made (and hence owns) the given info instance. The only trouble here is with static methods of plugin info classes such as \core\plugininfo\base::get_enabled_plugins(). In these cases, the code keeps using the core_plugin_manager singleton. The solution would be to pass the plugin manager instance as a parameter but that is not worth of change for now, IMHO.
2d488c8f