I am playing (again... *sigh*) with the db code, and found some instances of things like:
if (class_exists('\\ElkArte\\Errors\\Errors'))
{
Errors::instance()->log_error($log_message, 'critical', $file, $line);
}
if (class_exists('\\ElkArte\\Exceptions\\Exception'))
{
throw new Exception([false, $error_message], false);
}
etc.
hmm...(for when emoji will be a thing )
If we made it to the database, we already have the autoloader available.
If we have the autoloader available, the class can be loaded.
Am I wrong?
If this is right, the the only case I can think of in which the class may not exist is if it is missing from the file system...
Because even for integration with other codebases (e.g. via bootstrap) we do have the autoloader so we must have the classes.
Am I missing something obvious?