/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Foundation/Fixtures/Providers/ThrowUncaughtExceptionServiceProvider.php
30 строк
862 B
Bert
[9.x] Return non-zero exit code for uncaught exceptions (#46541)
06 апр 2023, 21:15
Не верифицирован
06 апр 2023, 21:15
6114330
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Foundation\Fixtures\Providers; use Illuminate\Console\Application; use Illuminate\Support\ServiceProvider; use Illuminate\Tests\Integration\Foundation\Fixtures\Console\ThrowExceptionCommand; use Illuminate\Tests\Integration\Foundation\Fixtures\Logs\ThrowExceptionLogHandler; class ThrowUncaughtExceptionServiceProvider extends ServiceProvider { public function register() { $config = $this->app['config']; $config->set('logging.default', 'throw_exception'); $config->set('logging.channels.throw_exception', [ 'driver' => 'monolog', 'handler' => ThrowExceptionLogHandler::class, ]); } public function boot() { Application::starting(function ($artisan) { $artisan->add(new ThrowExceptionCommand); }); } }