You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the hardcoded `config('app.env') === 'production'` scattered across
the core with one shared helper, so every production-only safety behaviour
is driven by the SAME condition (CoreServiceProvider debug-off, the admin
env badge, and any future front/shop/plugin check).
WHY exact "production": the helper wraps Laravel's own canonical check
(App::environment() === 'production'), which is what the framework's artisan
destructive-command guard uses. Keeping the same definition guarantees the
GP247 safety nets never diverge from Laravel's — an alias like "prod"/"live"
is deliberately NOT production, because Laravel would not guard it either.
The CoreServiceProvider debug-off net is moved after the helper glob load
(which exits on failure) and guarded with function_exists, falling back to
Laravel's own check: this path also runs during composer/package:discover,
so the security net must never depend on helper load order.
@aidlc-unit admin-shell
@aidlc-story US-AUI-env-identity
@aidlc-adr ADR-002
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>