chore: audit nits — PlanFeatures, test boot, EIA log, static method
Audit items #15, #16, #20, #22. #15 — AuthController::me and UserResource form/table now read tier via PlanFeatures::for($user)->tier() instead of Plan::resolveForUser($user) ->name. Tiers.md: PlanFeatures is the single entitlement gate. #16 — Moved SQLite GREATEST/LEAST PHP-backed function registration from AppServiceProvider::boot to tests/TestCase::setUp. Production app boot no longer checks the DB driver name. #20 — FetchOilPrices: added Log::warning on EIA fallback and Log::error on both-providers-failed so primary-source reliability can be trended beyond the cron output buffer. #22 — FuelPriceService::flattenEnabledFlags is now an instance method, matching the rest of the class. No external callers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,13 +59,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
app()->isProduction(),
|
||||
);
|
||||
|
||||
// SQLite lacks GREATEST/LEAST scalar functions — register them for tests.
|
||||
if (DB::connection()->getDriverName() === 'sqlite') {
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$pdo->sqliteCreateFunction('GREATEST', fn (...$args) => max($args), -1);
|
||||
$pdo->sqliteCreateFunction('LEAST', fn (...$args) => min($args), -1);
|
||||
}
|
||||
|
||||
Password::defaults(fn (): ?Password => app()->isProduction()
|
||||
? Password::min(12)
|
||||
->mixedCase()
|
||||
|
||||
Reference in New Issue
Block a user