Open tsteur opened 8 years ago
@tsteur which milestone do you think we should schedule for? is it easy to change or rather non trivial?
It is trivial to implement and to make it kinda work for normal use but tests require lots of work. I don't think we can break much there but would rather target 3.X
See https://github.com/piwik/piwik/issues/9201#issue-116481202
We should only use components, events, ... of a plugin when it is actually installed to prevent random errors. The installation of a plugin may take a while (between a few ms and up to days). Only once the plugin is actually loaded, activated and installed we should use it.
For example plugins won't be installed during tracker mode but if we use them there already even though they are not installed yet it will very likely break tracking. Also for non-tracker plugins it can prevent errors.
I tried to implement it recently but failed. Only hours afterwards I noticed the tests fail because we always assume plugins are uninstalled in TestConfig. While it's not hard to implement ignoring events, API methods and components of uninstalled plugins, making the tests work will be quite a bit of work from the looks.
Eg we need to add more plugins to the
PluginsInstalled
list inglobal.ini.php
. Otherwise./console
won't show any commands. We need to add at leastCoreConsole
andTestRunner
. Once this is done we will need to move some tests fromUnit
toIntegration
since they were placed in the wrong category. Once unit tests succeed the actual work begins as many tests only do->loadPlugin('API')
but it's not done by that. We also need to install them etc.