Changes
-
Octane compatibility: Replaced custom
SessionGuardwith direct session manipulation. The custom guard registered viaAuth::extend()was not surviving Octane's request sandboxing, causing impersonation to fail silently under Swoole/FrankenPHP. The package now manipulates auth session keys directly using Laravel's stockSessionGuard, removing the fragile class coupling. -
Failure notification: When impersonation fails, a Filament danger notification is now shown instead of silently doing nothing.
-
Diagnostic logging:
Log::warning()is now emitted whenenter()orleave()fails, with guard and user context for debugging. -
LeaveImpersonation event: The
$impersonatedparameter is now nullable to handle edge cases where the impersonated user was soft-deleted or removed during the session.