stechstudio/filament-impersonate
A Filament package to impersonate your users.
v5.6.0
4.1M downloads/mo
#1273 most downloaded on Packagist
stechstudio/filament-impersonate
What this package is like to depend on
Last release 1 months ago
06 Jul 2026
Release timing varies
gaps range from 2 weeks to 5 months
Rarely documented
notes for 7 of 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
63 releases · first in 2021
16 releases in the last 12 months
see the full history below
Release timeline
62 releases · Mar 2021 to Jul 2026Releases
latest 60 of 63-
v5.6.006 Jul 2026 -
v5.5.026 May 2026Release notes
Open source →What's Changed
- Scope Login/Logout impersonation clear to the impersonator's guard by @chengkangzai in #154
Full Changelog: v5.4.0...v5.5.0
-
v5.4.011 May 2026Release notes
Open source →What's Changed
- Change cookie expiration date when Impersonating by @LuizCristino in #153
New Contributors
- @LuizCristino made their first contribution in #153
Full Changelog: v5.3.0...v5.4.0
-
v5.3.014 Apr 2026Release notes
Open source →What's Changed
- Allow user to specify spa mode on redirect regardless of Filament configuration by @machacekmartin in #148
New Contributors
- @machacekmartin made their first contribution in #148
Full Changelog: v5.2.0...v5.3.0
-
v5.2.008 Apr 2026Release notes
Open source →What's Changed
- Add Romanian translation by @ideacatlab in #150
New Contributors
- @ideacatlab made their first contribution in #150
Full Changelog: v5.1.0...v5.2.0
-
v5.1.022 Feb 2026Release notes
Open source →What's Changed
- Add language support for zh_CN, zh_TW, ta, and ms by @chengkangzai in #149
New Contributors
- @chengkangzai made their first contribution in #149
Full Changelog: v5.0.0...v5.1.0
-
v5.0.013 Feb 2026Release notes
Open source →What's New
This is a major release that removes the
lab404/laravel-impersonatedependency entirely, replacing it with a lean, native implementation purpose-built for Filament — with full Octane compatibility.Native impersonation engine
All impersonation logic is now handled internally by
ImpersonateManager— a stateless, Octane-safe service registered as a scoped binding. No more pulling in a general-purpose impersonation package.Octane support
Impersonation works correctly under Laravel Octane (Swoole and FrankenPHP). The package uses direct session manipulation with Laravel's stock
SessionGuard, avoiding any custom guard registration that could break under Octane's request sandboxing.Impersonation facade
A new
Impersonationfacade provides a clean static API:use STS\FilamentImpersonate\Facades\Impersonation; Impersonation::isImpersonating(); Impersonation::getImpersonator(); Impersonation::getImpersonatorId(); Impersonation::enter($from, $to, $guardName); Impersonation::leave();
Events
New package-owned events replace the lab404 events:
STS\FilamentImpersonate\Events\EnterImpersonationSTS\FilamentImpersonate\Events\LeaveImpersonation
Both carry
$impersonatorand$impersonatedpublic properties.Failure feedback
When impersonation fails (e.g. incompatible guard), a Filament danger notification is now shown instead of silently doing nothing. Diagnostic
Log::warning()messages are also emitted for debugging.
Upgrading from v4
Removed:
lab404/laravel-impersonatedependencyThe package no longer requires or uses
lab404/laravel-impersonate. It will be removed from yourcomposer.lockautomatically on update.Removed:
Impersonatetrait (STS\FilamentImpersonate\Models\Impersonate)The trait that was added to User models has been removed. If your User model uses this trait, remove it:
- use STS\FilamentImpersonate\Models\Impersonate; - class User extends Authenticatable { - use Impersonate; }
If you had
canImpersonate()orcanBeImpersonated()methods on your model via the trait, just keep them as regular methods — the action checks for them withmethod_exists().Removed:
guardconfig keyThe
filament-impersonate.guardconfig option has been removed. The guard is now determined by the Filament panel's auth guard. For per-action override, use->guard('custom')on the action.If you published the config file, you can remove the
guardkey.Changed: Event classes
If you listen for impersonation events, update your imports:
- use Lab404\Impersonate\Events\TakeImpersonation; - use Lab404\Impersonate\Events\LeaveImpersonation; + use STS\FilamentImpersonate\Events\EnterImpersonation; + use STS\FilamentImpersonate\Events\LeaveImpersonation;
Changed:
ImpersonateManagernamespaceIf you referenced the manager directly (most users won't have), the namespace changed:
- use Lab404\Impersonate\Services\ImpersonateManager; + use STS\FilamentImpersonate\ImpersonateManager;
Prefer using the
Impersonationfacade instead.Changed:
impersonateRecord()signatureThe unused second parameter
$visiblehas been removed:- ->impersonateRecord($record, $visible) + ->impersonateRecord($record)
Internal Improvements
- 124 tests covering the manager, action, banner, route, facade, and configuration
- Translations for all 16 supported languages
- Updated README with current Filament v5 examples and fresh screenshots
-
v5.0.0-beta.313 Feb 2026 pre-releaseRelease notes
Open source →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.
-
-
v5.0.0-beta.212 Feb 2026 pre-releaseRelease notes
Open source →Bug Fix
- Fixed table row action not triggering impersonation — The action callback in
setUp()was missing the$recordparameter, causing the impersonate button on table rows to silently fail. Thevisible()callback was correct, so the button appeared but clicking it did nothing. (#146)
Full Changelog
See v5.0.0-beta.1 for the complete list of changes in the v5 release.
- Fixed table row action not triggering impersonation — The action callback in
-
v5.0.0-beta.112 Feb 2026 pre-releaseRelease notes
Open source →What's New
This is a major release that removes the
lab404/laravel-impersonatedependency entirely, replacing it with a lean, native implementation purpose-built for Filament.Native impersonation engine
All impersonation logic is now handled internally by
ImpersonateManager— a stateless, Octane-safe service registered as a scoped binding. No more pulling in a general-purpose impersonation package.Impersonation facade
A new
Impersonationfacade provides a clean static API:use STS\FilamentImpersonate\Facades\Impersonation; Impersonation::isImpersonating(); Impersonation::getImpersonator(); Impersonation::getImpersonatorId(); Impersonation::enter($from, $to, $guardName); Impersonation::leave();
Custom SessionGuard
A custom
SessionGuardwithquietLogin()/quietLogout()methods handles user switching without firing Laravel's auth events, preserving session state during impersonation.Events
New package-owned events replace the lab404 events:
STS\FilamentImpersonate\Events\EnterImpersonationSTS\FilamentImpersonate\Events\LeaveImpersonation
Both carry
$impersonatorand$impersonatedpublic properties.
Breaking Changes
Removed:
lab404/laravel-impersonatedependencyThe package no longer requires or uses
lab404/laravel-impersonate. It will be removed from yourcomposer.lockautomatically on update.Removed:
Impersonatetrait (STS\FilamentImpersonate\Models\Impersonate)The trait that was added to User models has been removed. The action uses
method_exists()checks, so the trait was never required. If your User model uses this trait, remove it:- use STS\FilamentImpersonate\Models\Impersonate; - class User extends Authenticatable { - use Impersonate; }
If you had
canImpersonate()orcanBeImpersonated()methods on your model via the trait, just keep them as regular methods — the action checks for them withmethod_exists().Removed:
guardconfig keyThe
filament-impersonate.guardconfig option has been removed. The guard is now determined by the Filament panel's auth guard (which is the correct default). For per-action override, use->guard('custom')on the action.If you published the config file, you can remove the
guardkey.Changed: Event classes
If you listen for impersonation events, update your imports:
- use Lab404\Impersonate\Events\TakeImpersonation; - use Lab404\Impersonate\Events\LeaveImpersonation; + use STS\FilamentImpersonate\Events\EnterImpersonation; + use STS\FilamentImpersonate\Events\LeaveImpersonation;
Changed:
ImpersonateManagernamespaceIf you referenced the manager directly (most users won't have), the namespace changed:
- use Lab404\Impersonate\Services\ImpersonateManager; + use STS\FilamentImpersonate\ImpersonateManager;
Prefer using the
Impersonationfacade instead.Changed:
impersonateRecord()signatureThe unused second parameter
$visiblehas been removed:- ->impersonateRecord($record, $visible) + ->impersonateRecord($record)
Changed:
app('impersonate')/app(ImpersonateManager::class)These still work, but the recommended API is now the
Impersonationfacade.
Internal Improvements
- Error handling:
enter()failure is now caught and handled before redirecting - Session cleanup:
clear()now also removes stale remember-me cookie staging data - Auth hash clearing: Simplified with a collect pipeline instead of nested conditionals
- Code organization: Dense
canImpersonate()boolean chain decomposed into readable guard clauses - 125 tests covering the manager, action, banner, route, facade, and configuration
-
4.1.411 Feb 2026Nothing published for this version
-
4.1.320 Jan 2026Nothing published for this version
-
4.1.216 Jan 2026Nothing published for this version
-
4.1.116 Jan 2026Nothing published for this version
-
4.0.229 Dec 2025Nothing published for this version
-
4.0.113 Aug 2025Nothing published for this version
-
3.6.130 Jan 2024Nothing published for this version
-
2.5.101 May 2022Nothing published for this version
-
2.4.221 Jan 2022Nothing published for this version
-
2.4.110 Jan 2022Nothing published for this version
-
2.3.210 Jan 2022Nothing published for this version
-
2.3.104 Jan 2022Nothing published for this version
-
4.116 Jan 2026Nothing published for this version
-
4.012 Aug 2025Nothing published for this version
-
3.905 Jun 2024Nothing published for this version
-
3.825 Mar 2024Nothing published for this version
-
3.723 Feb 2024Nothing published for this version
-
3.629 Jan 2024Nothing published for this version
-
3.514 Aug 2023Nothing published for this version
-
3.410 Aug 2023Nothing published for this version
-
3.302 Aug 2023Nothing published for this version
-
3.201 Aug 2023Nothing published for this version
-
3.1615 Apr 2025Nothing published for this version
-
3.1503 Dec 2024Nothing published for this version
-
3.1427 Aug 2024Nothing published for this version
-
3.1323 Jul 2024Nothing published for this version
-
3.1218 Jul 2024Nothing published for this version
-
3.1111 Jul 2024Nothing published for this version
-
3.1005 Jul 2024Nothing published for this version
-
3.131 Jul 2023Nothing published for this version
-
3.027 Jul 2023Nothing published for this version
-
2.907 Nov 2022Nothing published for this version
-
2.8no dateNothing published for this version
-
2.707 Nov 2022Nothing published for this version
-
2.628 Sep 2022Nothing published for this version
-
2.529 Apr 2022Nothing published for this version
-
2.405 Jan 2022Nothing published for this version
-
2.303 Jan 2022Nothing published for this version
-
2.2002 Aug 2023Nothing published for this version
-
2.203 Jan 2022Nothing published for this version
-
2.1930 Jun 2023Nothing published for this version
-
2.1826 Mar 2023Nothing published for this version
-
2.1724 Feb 2023Nothing published for this version
-
2.1621 Feb 2023Nothing published for this version
-
2.1519 Feb 2023Nothing published for this version
-
2.1418 Feb 2023Nothing published for this version
-
2.1318 Feb 2023Nothing published for this version
-
2.1218 Feb 2023Nothing published for this version
-
2.1109 Jan 2023Nothing published for this version
-
2.1026 Nov 2022Nothing published for this version