File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1616use CodeIgniter \Cache \FactoriesCache ;
1717use CodeIgniter \CLI \Console ;
1818use CodeIgniter \Config \DotEnv ;
19+ use Config \App ;
1920use Config \Autoload ;
2021use Config \Modules ;
2122use Config \Optimize ;
@@ -75,6 +76,34 @@ public static function bootWeb(Paths $paths): int
7576 return EXIT_SUCCESS ;
7677 }
7778
79+ /**
80+ * Used by command line scripts other than
81+ * * `spark`
82+ * * `php-cli`
83+ * * `phpunit`
84+ *
85+ * @used-by `system/util_bootstrap.php`
86+ */
87+ public static function bootConsole (Paths $ paths ): void
88+ {
89+ static ::definePathConstants ($ paths );
90+ static ::loadConstants ();
91+ static ::checkMissingExtensions ();
92+
93+ static ::loadDotEnv ($ paths );
94+ static ::loadEnvironmentBootstrap ($ paths );
95+
96+ static ::loadCommonFunctions ();
97+ static ::loadAutoloader ();
98+ static ::setExceptionHandler ();
99+ static ::initializeKint ();
100+ static ::autoloadHelpers ();
101+
102+ // We need to force the request to be a CLIRequest since we're in console
103+ Services::createRequest (new App (), true );
104+ service ('routes ' )->loadRoutes ();
105+ }
106+
78107 /**
79108 * Used by `spark`
80109 *
You can’t perform that action at this time.
0 commit comments