fix: AppServiceProvider CLI 컨텍스트에서 request() 호출 에러 수정
- runningInConsole() 체크 추가로 artisan 명령어 실행 시 request 바인딩 에러 방지 - composer install 후 package:discover 실패 해결 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,9 +46,8 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
// 개발환경 + API 라우트에서만 쿼리 로그 수집
|
// 개발환경 + API 라우트에서만 쿼리 로그 수집
|
||||||
if (app()->environment('local')) {
|
if (app()->environment('local') && !app()->runningInConsole()) {
|
||||||
// 콘솔/큐 등 non-HTTP 컨텍스트 보호
|
if (request()->is('api/*')) {
|
||||||
if (function_exists('request') && request() && request()->is('api/*')) {
|
|
||||||
DB::enableQueryLog();
|
DB::enableQueryLog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user