Skip to content

Releases: spatie/laravel-permission

7.3.0

07 Apr 15:21

Choose a tag to compare

What's Changed

Downgraded PHP requirement to 8.3.

New Contributors

Full Changelog: 7.2.4...7.3.0

7.2.4

17 Mar 22:59

Choose a tag to compare

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

17 Mar 22:55
d7d4cb0

Choose a tag to compare

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

23 Feb 20:30
062b0cd

Choose a tag to compare

  • Update config comments to point to new v7 event class names

7.2.2

22 Feb 08:20
4b2572e

Choose a tag to compare

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

21 Feb 23:29
64ad4d3

Choose a tag to compare

What's Changed

  • Add Laravel 13 support
  • Upgrade to laravel/passport ^13.0
  • Drop prefer-lowest from CI matrix

7.2.0

18 Feb 19:32
7d5ca47

Choose a tag to compare

What's Changed

  • Fix: do not treat string '0' as empty role/permission input by @laraib15 in #2916

New Contributors

Full Changelog: 7.1.0...7.2.0

7.0.0

11 Feb 08:46
f2a55b4

Choose a tag to compare

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 PackageServiceProvider from spatie/laravel-package-tools
  • Removed Lumen support

Class renames

  • Event classes now have an Event suffix (PermissionAttachedPermissionAttachedEvent, etc.)
  • Command classes now have a Command suffix (CacheResetCacheResetCommand, 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 X
  • get_class($obj)$obj::class
  • strpos($x, $y) !== falsestr_contains($x, $y)
  • Constructor promotion in WildcardPermission
  • Proper use imports for global classes

Cleanup

  • Removed deprecated clearClassPermissions() method
  • Removed __construct from Wildcard contract
  • Modernized migration stubs

Testing

  • Converted entire test suite from PHPUnit to Pest (#2912)

Full Changelog: 6.24.1...7.0.0

6.24.1

09 Feb 21:10

Choose a tag to compare

What's Changed

Full Changelog: 6.24.0...6.24.1

6.24.0

13 Dec 21:47
76adb1f

Choose a tag to compare

What's Changed

Internals/Testing

Full Changelog: 6.23.0...6.24.0