File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ public static function bootTest(Paths $paths): void
184184 static ::setExceptionHandler ();
185185 static ::initializeKint ();
186186 static ::autoloadHelpers ();
187+ static ::preloadCoreClasses ();
187188 }
188189
189190 /**
@@ -443,4 +444,20 @@ protected static function runCommand(Console $console): int
443444
444445 return is_int ($ exit ) ? $ exit : EXIT_SUCCESS ;
445446 }
447+
448+ /**
449+ * Pre-loads core framework classes during test bootstrap.
450+ *
451+ * In parallel test environments (e.g., GitHub Actions with Docker
452+ * overlayfs), the first autoload of a large PHP file can fail due to
453+ * transient filesystem read issues at process startup time — either
454+ * a realpath() failure or a truncated read from the overlayfs kernel
455+ * layer. Loading the affected files here (after all other bootstrap
456+ * I/O has completed) ensures they are in PHP's class table before
457+ * any test runs, avoiding the need to autoload them cold.
458+ */
459+ protected static function preloadCoreClasses (): void
460+ {
461+ require_once SYSTEMPATH . 'CodeIgniter.php ' ;
462+ }
446463}
You can’t perform that action at this time.
0 commit comments