Skip to content

Releases: spatie/laravel-permission

8.3.0

Choose a tag to compare

@drbyte drbyte released this 03 Jul 15:37
60e8ed5

What's Changed

  • Fix initializeCache() not clearing in-memory perms collection on tenant/cache switch by @drbyte in #2965
  • Add wiring-level test coverage for the Octane reset listener by @drbyte in #2966

ALSO CHECK THE RELEASE NOTES FOR 8.2.0

Full Changelog: 8.2.0...8.3.0

8.2.0

Choose a tag to compare

@drbyte drbyte released this 03 Jul 00:10
e97b036

What's Changed

  • Fire PermissionDetachedEvent when syncing permissions (symmetry with syncRoles) by @chengkangzai in #2963
  • Fixed a bug where removing a role or permission from a model on one team could also remove that same assignment on other teams, when the model uses a custom pivot class (->using(CustomPivot::class)) on roles()/permissions() with teams enabled. (Issue #2867) by @drbyte in #2961

Watch out for in your own test suite:

  • If you use custom pivot model deleting/deleted hooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening for RoleDetachedEvent / PermissionDetachedEvent instead.
  • revokePermissionTo() can now throw GuardDoesNotMatch in rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used by givePermissionTo(). This should not affect normal usage (permissions being revoked are already guard-matched), but if your tests exercise unusual multi-guard setups, re-run them against this release.

Full Changelog: 8.1.0...8.2.0

8.1.0

Choose a tag to compare

@drbyte drbyte released this 27 Jun 19:38
754db00

What's Changed

  • Fixed: mismatched surrounding quote characters in pipe-delimited role strings are now preserved instead of stripped. by @albertoarena in #2960

Fixes malformed pipe strings that start with ' or " and do not end with the same quote. Normal documented usage is unchanged:

hasAnyRole('writer|admin')       // same
hasAnyRole("'writer|admin'")     // same
hasAnyRole('"writer|admin"')     // same
hasAnyRole("'writer|admin")      // changed: mismatched apostrophe is removed
hasAnyRole("'writer|admin\"")    // changed: mismatched quote is removed

also

New Contributors

Full Changelog: 8.0.0...8.1.0

8.0.0

Choose a tag to compare

@drbyte drbyte released this 30 May 19:31

What's Changed

Full Changelog: 7.4.2...8.0.0

7.4.2

Choose a tag to compare

@drbyte drbyte released this 30 May 19:27

What's Changed

  • Remove stale phpstan ignore HasPermission instanceof.alwaysFalse by @YasserB94 in #2952

Full Changelog: 7.4.1...7.4.2

7.4.1

Choose a tag to compare

@freekmurze freekmurze released this 29 Apr 08:00
ef42ecb

What's Changed

  • Do not throw from teams() when teams feature is disabled by @freekmurze in #2949

Full Changelog: 7.4.0...7.4.1

7.4.0

Choose a tag to compare

@freekmurze freekmurze released this 28 Apr 14:02
6f60746

What's Changed

New Contributors

Full Changelog: 7.3.0...7.4.0

7.3.0

Choose a tag to compare

@drbyte drbyte released this 07 Apr 15:21

What's Changed

Downgraded PHP requirement to 8.3.

New Contributors

Full Changelog: 7.2.4...7.3.0

7.2.4

Choose a tag to compare

@drbyte drbyte released this 17 Mar 22:59

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

Choose a tag to compare

@drbyte drbyte released this 17 Mar 22:55
d7d4cb0

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