ClassScanner - Re-skip `_Form` classes
authorTim Otten <totten@civicrm.org>
Thu, 27 Jul 2023 00:42:45 +0000 (17:42 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 27 Jul 2023 00:44:26 +0000 (17:44 -0700)
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

index f23dde88c4a8917be245318d5ea228931f539718..fff55a2450ffbe40fa525f6f444910e3fcf53f7d 100644 (file)
@@ -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);