# Changelog

## Score

- CAI 66 → 66 (-0.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

## Lenses

- Code Health 68 → 66 (-2.0)
- Architecture 96 → 96 (+0.1)
- Maturity 58 → 59 (+0.7)
- Readiness 85 → 85 (+0.0)
- Security 68 → 68 (+0.0)

## Resolved (3)

- Duplicate intent: `hasPermissionTo` vs `checkPermissionTo`. The `HasPermissions` trait exposes both `hasPermissionTo` and `checkPermissionTo` with identical signatures and likely identical implementations (checking if a user has a permission). This is redundant naming for the same operation.
- Naming inconsistency between 'Any/All' and 'AnyDirect/AllDirect'. While distinct in logic (roles vs direct), the naming convention is inconsistent. `hasAnyPermission` and `hasAllPermissions` do not explicitly state they include role-derived permissions, whereas `hasAnyDirectPermission` explicitly states 'Direct'. This forces the user to memorize which methods include role permissions and which do not, rather than having a clear pattern like `hasPermissionIncludingRoles` vs `hasDirectPermission`.
- Return type inconsistency between Contract and Model implementations. The Contract interfaces return `self`, while the concrete Model classes return their specific type (`Permission` or `Role`). While technically valid in PHP, this creates a slight inconsistency in the public API surface where the contract promises a generic `self` but the implementation is more specific. More importantly, `findOrCreate` on the Contract returns `self` but on the Model returns the specific class, which is consistent within each type but inconsistent across the abstraction boundary if one expects the contract to define the exact return shape for fluent chaining.

## New (9)

- Duplicated block (6 lines × 4) (src/PermissionServiceProvider.php)
- Edited copies of one member (3 members, 24+ corresponding lines) (src/Middleware/PermissionMiddleware.php)
- Edited copy of a member (11 corresponding lines) (src/Traits/HasPermissions.php)
- Edited copy of a member (13 corresponding lines) (src/Traits/HasPermissions.php)
- Edited copy of a member (16 corresponding lines) (src/Traits/HasPermissions.php)
- Edited copy of a member (22 corresponding lines) (src/Traits/HasPermissions.php)
- Edited copy of a member (38 corresponding lines) (src/Traits/HasPermissions.php)
- Edited copy of a member (8 corresponding lines) (src/Models/Permission.php)
- Edited copy of a member (8 corresponding lines) (src/Models/Permission.php)

## Changes since last survey

- 15 commits — 14 feature/other, 1 fixes

## By area

- (repo) — 4 commits
- docs/basic-usage — 4 commits
- (root) — 3 commits
- docs/advanced-usage — 1 commit
- src/PermissionServiceProvider.php — 1 commit
- src/Traits — 1 commit
- tests/Traits — 1 commit

## Notable commits

- fix: Merge pull request #2982 from AleksandrSpicyn/contrib/fix-disabled-teams-relation
- change: Cover populated and custom disabled teams relations
- change: Document global scopes and permission cache isolation (#2985)
- change: Document route group macro middleware ordering
- change: Merge pull request #2980 from ziadoz/route-group-macros
- change: Merge pull request #2981 from ziadoz/route-alias-macros
- change: Merge remote-tracking branch 'origin/main' into review-2981
- change: Update CHANGELOG
- change: Update CHANGELOG
- change: Update CHANGELOG
- change: Use a valid pivot for the disabled teams relation
- change: Verify route aliases through authorization outcomes
- change: add canAny and canAll route macros
- change: allow role and permission route macros on route groups
- change: register group route macros individually
