fix: unexpected db query during composer install

This commit is contained in:
Steven Qiu 2025-06-27 19:23:20 +08:00
parent fa791857ec
commit 5125862f80
No known key found for this signature in database
GPG Key ID: 8ACE9DCFC76F38B9

View File

@ -40,7 +40,7 @@ class AuthServiceProvider extends ServiceProvider
'ReportsManagement.ReadWrite' => 'auth.oauth.scope.reports-management.readwrite',
];
$scopes = Cache::rememberForever('scopes', function () {
$scopes = app()->runningConsoleCommand('package:discover') ? [] : Cache::rememberForever('scopes', function () {
return Scope::pluck('description', 'name')->toArray();
});