Releases: spatie/laravel-permission
Releases · spatie/laravel-permission
Release list
8.3.0
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
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)) onroles()/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/deletedhooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening forRoleDetachedEvent/PermissionDetachedEventinstead. revokePermissionTo()can now throwGuardDoesNotMatchin rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used bygivePermissionTo(). 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
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 removedalso
- docs: modernize middleware usage examples by @zainphp in #2954
- Bump actions/checkout from 6 to 7 by @dependabot[bot] in #2959
New Contributors
- @zainphp made their first contribution in #2954
- @albertoarena made their first contribution in #2960
Full Changelog: 8.0.0...8.1.0
8.0.0
What's Changed
- Extend BackedEnum support on Role/Permission by @YasserB94 in #2953
Full Changelog: 7.4.2...8.0.0
7.4.2
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
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
What's Changed
- Bump dependabot/fetch-metadata from 2 to 3 by @dependabot[bot] in #2945
- Fix malformed Bouncer link in README by @dhrupo in #2943
- Teams accessors in HasRolesTrait by @AnjeyNov in #2928
- Add syncModels method to Role model with HasModels trait by @Briareos17 in #2922
New Contributors
- @dhrupo made their first contribution in #2943
- @AnjeyNov made their first contribution in #2928
- @Briareos17 made their first contribution in #2922
Full Changelog: 7.3.0...7.4.0
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