Upgrade
First stable release.
Added
- Config options:
session_key,guard,routing.prefix,routing.middleware,routing.names.* - Stack helpers:
originalUser(),impersonator(),impersonations() - Cancellable
ImpersonationStarting(abort()or listener returningfalse) - Middleware aliases
impersonatingandnot-impersonating - Package exception rendering to 401/403
- Topic-based documentation under
docs/for bradietilley.dev LICENSE.mdand contributor composer scripts
Changed
- Requires PHP 8.3+ and Laravel 13
routing.enableddefaults tofalse- Package routes use configurable prefix (default
/impersonation/...) withweb+authmiddleware - Default login uses
Auth::login($user, false)(no remember-me) ImpersonationFinisheddispatches after restore/login/save- Events no longer implement
ShouldQueue
Removed
- Laravel 11 support
- Hardcoded
/api/impersonation/...route paths
Migration from 0.1
- Upgrade to PHP 8.3+ and Laravel 13
- Publish config and set
routing.enabledtotrueif you relied on package routes - Update route URLs/names if you linked to the old
/api/impersonation/...paths - Ensure
ImpersonationFinishedlisteners tolerate post-restore timing - Move any
ShouldQueueexpectation from events onto listeners - Implement
Impersonateableon your user model if you have not already