Releases: hdaklue/porter
Releases · hdaklue/porter
Release list
2.0.12
2.0.11
Add role hierarchy comparison methods with equal-to conditions - Add isHigherThanOrEqual method to RoleContract and HasRoleHierarchy - Add getRolesLowerThanOrEqual and getRolesHigherThanOrEqual to RoleFactory - Add comprehensive docblocks to all RoleFactory methods - Improve return type declarations for consistency
2.0.10
Extract caching logic to dedicated RoleCacheManager - Create new RoleCacheManager with all static methods for cache operations - Move all cache-related methods from RoleManager to RoleCacheManager - Reduce RoleManager from 778 to 610 lines (21.6% reduction) - Improve separation of concerns: RoleManager handles business logic, RoleCacheManager handles caching - Maintain 100% backward compatibility with existing public API - All 243 tests passing with 1760 assertions
2.0.9
Fix role check cache invalidation for cross-session changes - Replace clearRoleCheckCaches to iterate all registered roles - Ensures both old and new role caches are cleared during role changes - Fixes cache persistence issue across different user sessions - Improves cache invalidation reliability for changeRoleOn operations
2.0.8
Refactor changeRoleOn method and fix cache invalidation - Simplify changeRoleOn by reusing remove() and assign() methods - Fix cache invalidation bug for role changes - Update destroyTenantRoles return type from int to bool - Fix multitenancy test to correctly enforce tenant integrity on role changes
2.0.7
Improve multitenancy validation for flexible cross-tenant assignments - Allow users to be assigned to any tenant entity without restrictions - Allow users with existing roles in a tenant to be assigned to any entity within that tenant - Add noRoleInTenant() exception with clearer error messaging - Update validation logic to check tenant participation via Roster table - Refactor tests to validate new cross-tenant assignment behavior - Update README to reflect smart tenant validation features
2.0.6
Add role translations and publishable translation support - Add English and Arabic translation files for role labels and descriptions - Update PorterServiceProvider to make translations publishable via porter-translations tag - Add comprehensive translation tests covering both languages and fallback behavior - Enable automatic translation loading from package lang directory
2.0.5
Add Laravel validation rules for role assignment validation Features: - NotAssignedTo rule: validates entity is not already assigned - AssignedTo rule: validates entity has existing role assignment - Comprehensive test suite with 18 tests covering edge cases - Updated Laravel integration docs with validation examples - Code formatted with Laravel Pint Benefits: - Prevents duplicate role assignments - Validates existing assignments before operations - Seamless Laravel validation system integration - Type-safe using Porter entity contracts