1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 15:14:20 +02:00

feat(console): move event onFlextypeConsoleBeforeRun to flextype boot file #543

This commit is contained in:
Awilum
2021-09-14 07:57:44 +03:00
parent 2157bd0fef
commit 4982897d0e
2 changed files with 2 additions and 3 deletions

View File

@@ -22,9 +22,7 @@ class FlextypeConsoleApplication extends ConsoleApplication
// Add Console Commands
console()->add(new EntriesCreateCommand());
console()->add(new EntriesDeleteCommand());
// Run Flextype Console Application
emitter()->emit('onFlextypeConsoleBeforeRun');
parent::run();
}
}

View File

@@ -401,6 +401,7 @@ app()->add(new WhoopsMiddleware([
// Run Flextype Application
if (php_sapi_name() === 'cli') {
emitter()->emit('onFlextypeConsoleBeforeRun');
console()->run();
} else {
emitter()->emit('onFlextypeBeforeRun');