-
Improvement
-
Resolution: Fixed
-
Critical
-
4.5
-
MOODLE_405_STABLE
-
MOODLE_405_STABLE
-
MDL-82156-main -
Following from MDL-81919 and MDL-80275 I feel that it would be prudent to validate that certain critical classes are in the cache before accepting it.
There is already a mechanism in place for this, but it does not check the presence of classes.
This is particularly important as we move classes from monolith files into autoloaded classes and stop automatically loading them all. At the moment (in MDL-81919) we are adding things like this:
// TODO MDL-81933 Remove after Moodle 4.5 release.
|
require_once($CFG->libdir . '/classes/exception/moodle_exception.php'); // Required by some other legacy libraries.
|
require_once($CFG->libdir . '/classes/output/bootstrap_renderer.php'); // Required by some other legacy libraries.
|
The same is also true for some hooks in Moodle 4.4.
I wonder whether a better approach would be to check for some (not all or many) of these classes in the cache during the loading. I would suggest that we keep a small array of these classes which we update when we encounter a new critical path (that is something that is required during every page load and which prevents access to the UI upgrade infrastructure).
- blocks
-
MDL-81134 Remove upgrade critical requires
- Open
-
MDL-82159 Break apart lib/navigationlib.php
- Waiting for peer review
-
MDL-82183 Break apart lib/output*
- Closed
-
MDL-81920 Split out the emoticon/lang string classes from moodlelib
- Closed
-
MDL-81960 Break apart lib/weblib.php
- Closed
-
MDL-82158 Break apart cache/lib.php classes
- Closed
- is blocked by
-
MDL-81919 Break apart lib/setuplib.php
- Closed