From 889687ab2230822dc5aeb3ea551466e5e15d0cf0 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 26 Jul 2023 17:42:45 -0700 Subject: [PATCH] ClassScanner - Re-skip `_Form` classes Follow-up to #26936. The prior commit was good in that it stopped scanning `CRM_Core_QuickForm_*` classes. But it also turned-on unnecessary scanning of `CRM_*_Form_*`. Flip that back. At time of writing, this represents ~500 unnecessary reads (e.g. scanning 1000 files vs 1500 files). --- 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 f23dde88c4..fff55a2450 100644 --- a/Civi/Core/ClassScanner.php +++ b/Civi/Core/ClassScanner.php @@ -142,7 +142,7 @@ class ClassScanner { $classes = []; static::scanFolders($classes, $civicrmRoot, 'Civi/Test/ExampleData', '\\'); // Most older CRM_ stuff doesn't implement event listeners & services so can be skipped. - static::scanFolders($classes, $civicrmRoot, 'CRM', '_', ';(Upgrade|Utils|Exception|_DAO|_Page|_Controller|_StateMachine|_Selector|_CodeGen|_QuickForm);'); + static::scanFolders($classes, $civicrmRoot, 'CRM', '_', ';(Upgrade|Utils|Exception|_DAO|_Page|_Form|_Controller|_StateMachine|_Selector|_CodeGen|_QuickForm);'); static::scanFolders($classes, $civicrmRoot, 'Civi', '\\', ';\\\(Security|Test)\\\;'); $cache->set($cacheKey, $classes, static::TTL); -- 2.25.1