You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in global.ini.php. Otherwise ./console won't show any commands. We need to add at least CoreConsole and TestRunner. Once this is done we will need to move some tests from Unit to Integration 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.
The text was updated successfully, but these errors were encountered:
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 #9201 (comment)
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.The text was updated successfully, but these errors were encountered: