From 75d713022e171f3e16253ee9fb0f0ef098b43e69 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 23 Sep 2022 14:56:05 -0400 Subject: [PATCH] can't call log this early --- Civi/Core/ClassScanner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Core/ClassScanner.php b/Civi/Core/ClassScanner.php index bc81ca79755e..5b318d056baa 100644 --- a/Civi/Core/ClassScanner.php +++ b/Civi/Core/ClassScanner.php @@ -202,7 +202,7 @@ public static function scanFolders(array &$classes, string $classRoot, string $c } elseif (!interface_exists($class) && !trait_exists($class)) { // If you get this error, then perhaps (a) you need to fix the name of file/class/namespace or (b) you should disable class-scanning. - \Civi::log('class_scanner')->warning("Scanned file {$relFile} for class {$class}, but it was not found."); + throw new \RuntimeException("Scanned file {$relFile} for class {$class}, but it was not found."); } } }