moodle-tool_mergeusers
moodle-tool_mergeusers copied to clipboard
autoloading
Moodle has it's own built-in class autoloading, it would be better for the code to follow this standard rather than implement it's own class autoloading.
here's an example of using core autoloading for the config class; https://github.com/danmarsden/moodle-tool_mergeusers/commit/2fecc11a5b7197d25323845cd9ede297fbd2a21a
and here are the related moodledocs: https://docs.moodle.org/dev/Automatic_class_loading
Thanks for your comments!
We'll take a look at that. Meanwhile, you could build a PR with the specific changes too.
Thanks in advance!
Jordi
Thanks Jordi - I might not have time at this stage - was making the changes as part of a review for a client - we failed the review on the performance of settings.php and the generic class name "config" but after fixing those issues we may not have much time to do anything else.
Thanks anyway!
Keep tuned in!
Jordi
We have addressed this issue in the short past.
However, files in mergeusers/classes/ should be:
- config.php and logger.php for M2.6 and on, BUT
- tool_mergeusers_config.php and tool_mergeusers_logger.php for M2.4 and M2.5.
Therefore, we have updated the last version of this plugin not compatible for M2.6 and on, actually.
I think we should start working on branching MOODLE_XX_STABLE or something like that.
Jordi
This still applies. We could start moving current lib classes into classes/ directory properly. It would be easier to develop with this plugin and all its components.