Version History
This package follows Semantic Versioning. The changelog below highlights recent changes. For the complete version history, see the full CHANGELOG on GitHub.Latest Releases
v7.2.3 - 2026-02-23
Updated config file comments to point to new v7 event class names.v7.2.2 - 2026-02-22
What’s Changed- Clear wildcard permission index when assigning or removing roles by @freekmurze in #2925
v7.2.1 - 2026-02-21
What’s Changed- Add Laravel 13 support
- Upgrade to laravel/passport ^13.0
- Drop prefer-lowest from CI matrix
v7.2.0 - 2026-02-18
What’s Changed- Fix: do not treat string ‘0’ as empty role/permission input by @laraib15 in #2916
v7.1.0 - 2026-02-14
What’s Changed- Bring back support for PHP 8.3 by @ssw1cblarrion in #2918
Major Releases
v7.0.0 - 2026-02-11
Version 7 modernizes the codebase while keeping the upgrade path relatively easy. See the Upgrading Guide for migration instructions.
Version Requirements
- Requires PHP ^8.4 and Laravel ^12.0
- Test suite uses Pest ^3.0
Service Provider
- Converted to
PackageServiceProviderfromspatie/laravel-package-tools - Removed Lumen support
Class Renames
- Event classes now have an
EventsuffixPermissionAttached→PermissionAttachedEventRoleAttached→RoleAttachedEvent- etc.
- Command classes now have a
CommandsuffixCacheReset→CacheResetCommandCreateRole→CreateRoleCommand- etc.
Type Safety
- Added return types and parameter types throughout traits, middleware, exceptions, contracts, and commands
Code Modernization
is_a($this, X::class)→$this instanceof Xget_class($obj)→$obj::classstrpos($x, $y) !== false→str_contains($x, $y)- Constructor promotion in
WildcardPermission - Proper
useimports for global classes
Cleanup
- Removed deprecated
clearClassPermissions()method - Removed
__constructfromWildcardcontract - Modernized migration stubs
Testing
- Converted entire test suite from PHPUnit to Pest
v6.0.0 - 2023-10-25
View v6.0.0 Changes
View v6.0.0 Changes
Major version with numerous improvements and breaking changes.Key Changes:
- Full UUID/GUID/ULID support
- Refactored static properties to non-static
- Added BackedEnum support
- Dropped PHP 7.3 and 7.4 support
@haspermissionBlade directive- Added
withoutRoleandwithoutPermissionscopes - Middleware namespace changed from
MiddlewarestoMiddleware - Wildcard permissions algorithm performance improvements
- Laravel Octane support improvements
- ID parameters must be passed as integers, not strings
getPermissionClass()andgetRoleClass()now return strings- Migration files updated to anonymous class syntax
Role->hasPermissionTo()signature changed to matchHasPermissionstrait
v5.0.0 - 2021-08-31
View v5.0.0 Changes
View v5.0.0 Changes
Key Changes:
- Changed default guard lookup to prefer current user’s guard
- Added Teams/Groups feature
- Customized pivots instead of
role_id,permission_id - Performance improvements
v4.0.0 - 2021-01-27
View v4.0.0 Changes
View v4.0.0 Changes
Key Changes:
- Dropped support for Laravel 5.8
- Fixed bug when adding roles to unsaved models
- Enforced unique constraints at database level
- Made
PermissionRegistrar::initializeCache()public - Changed from
Support\CollectiontoEloquent\Collection
- PHP 7.2.5+
- Laravel 6.0+
Notable Features by Version
Recent Feature Highlights
Recent Feature Highlights
v6.24.0 (2025-12-13)
- Add BackedEnum support to RoleOrPermissionMiddleware
- Add missing
roleOrPermission()route macro - PHP 8.5 compatibility fixes
v6.22.0 (2025-10-27)
- Dispatch
RoleDetachedevent onsyncRoles - Fix TOCTOU race condition for Octane
- Add
assign-roleartisan command
v6.20.0 (2025-06-14)
- Add translations support for exception messages
v6.17.0 (2025-04-09)
- Route macro functions: add backed enum support
v6.16.0 (2025-02-28)
- Middleware: support enums in role/permission middleware
v6.15.0 (2025-02-17)
- Added 4 events for adding and removing roles or permissions
- Fixed bug loading user roles across different teams
v6.11.0 (2025-01-30)
- Add configurable team resolver for permission team ID (helpful for Jetstream)
v6.10.0 (2024-11-05)
- Improve performance for hydrated collections
- Remove v5 cache fallback alias
- Include Larastan in dev dependencies
Support & Compatibility
Current Version Requirements
| Package Version | PHP Version | Laravel Version |
|---|---|---|
| v7.x | 8.4+ | 12.0+ |
| v6.x | 8.0+ | 8.0+ |
| v5.x | 7.3+ | 6.0+ |
| v4.x | 7.2.5+ | 6.0+ |
Always use the latest minor version within your major version for the latest bug fixes and improvements.
Migration Guides
When upgrading between major versions:Release Notes
For detailed release notes and contributor information, see:Stay Updated
To stay informed about new releases:- Watch the GitHub repository
- Follow @spatie_be on Twitter
- Subscribe to Spatie’s newsletter