Releases: spatie/laravel-permission
Releases · spatie/laravel-permission
7.3.0
What's Changed
Downgraded PHP requirement to 8.3.
- Change PHP requirement from ^8.4 to ^8.3 by @erikn69 in #2939
- [Docs] Fix grammar: 'offers' -> 'offer' by @tareq-halaby in #2940
New Contributors
- @tareq-halaby made their first contribution in #2940
Full Changelog: 7.2.4...7.3.0
7.2.4
What's Changed
- Internals only.
- Bump ramsey/composer-install from 3 to 4 by @dependabot[bot] in #2936
Full Changelog: 7.2.3...7.2.4
6.25.0
What's Changed
- Add Laravel 13 compatibility to old branch, so that 3rd party packages can support L13 without urgent upgrading
- Convert test suite from PHPUnit to Pest by @freekmurze in #2912
Full Changelog: 6.24.1...6.25.0
7.2.3
- Update config comments to point to new v7 event class names
7.2.2
What's Changed
- Clear wildcard permission index when assigning or removing roles by @freekmurze in #2925
Full Changelog: 7.2.1...7.2.2
7.2.1
What's Changed
- Add Laravel 13 support
- Upgrade to laravel/passport ^13.0
- Drop prefer-lowest from CI matrix
7.2.0
7.0.0
Modernize codebase for v7
The aim for v7 is to modernize the codebase while keeping the upgrade path easy. Modern PHP/Laravel features, Pest tests, but no big architectural changes. A future v8 could then tackle larger changes and streamline the package more fundamentally.
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
Eventsuffix (PermissionAttached→PermissionAttachedEvent, etc.) - Command classes now have a
Commandsuffix (CacheReset→CacheResetCommand, 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 (#2912)
Full Changelog: 6.24.1...7.0.0
6.24.1
What's Changed
- Add team support to permission:assign-role command by @freekmurze in #2910
Full Changelog: 6.24.0...6.24.1
6.24.0
What's Changed
- Add BackedEnum Support to RoleOrPermissionMiddleware by @imhayatunnabi in #2890
- Add Missing roleOrPermission() route macro by @imhayatunnabi in #2893
- PHP 8.5: Fix deprecated usage of
nullas array key by @jnoordsij in #2904
Internals/Testing
- Skip prefer-lowest dependency version for Laravel 11 by @drbyte in #2903
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #2901
Full Changelog: 6.23.0...6.24.0