Skip to content

Commit d3ee595

Browse files
chore(main): release 2.0.0 (#24)
* chore(main): release 2.0.0 * Update CHANGELOG for version 2.0.0 release Document major release changes and new features in v2.0.0.
1 parent 28d0a0e commit d3ee595

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

CHANGELOG.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,85 @@
11
# Changelog
22

3+
## [2.0.0](https://github.com/offload-project/laravel-mandate/compare/v1.4.0...v2.0.0) (2026-01-09)
4+
5+
6+
This release is a major rewrite of Laravel Mandate with significant new features and architectural improvements.
7+
8+
### Features
9+
10+
#### Code-First Definitions
11+
* Define permissions, roles, and capabilities as PHP classes with attributes
12+
* Auto-discovery and synchronization to the database via `mandate:sync`
13+
* IDE autocompletion and type safety for authorization checks
14+
* Support for labels, descriptions, guards, and feature associations via attributes
15+
16+
#### Context-Scoped Authorization (Multi-Tenancy)
17+
* Scope roles and permissions to a polymorphic context model (Team, Organization, etc.)
18+
* Global fallback option to check unscoped permissions when context check fails
19+
* Full multi-tenancy support for complex authorization scenarios
20+
21+
#### Capabilities System
22+
* Semantic groupings of permissions for logical organization
23+
* Capabilities can be assigned to roles or directly to subjects
24+
* Hierarchical permission bundling for cleaner role management
25+
26+
#### Feature Integration
27+
* Integration with Laravel Pennant or Hoist for feature flag gating
28+
* Tie permissions to feature flags for conditional access
29+
* Configurable behavior when feature handler is missing (allow/deny/throw)
30+
31+
#### Audit Logging
32+
* Pluggable `AuditLogger` contract for custom audit implementations
33+
* Log permission grants, revokes, role assignments, and access denials
34+
* Optional logging of all permission/role checks for compliance
35+
* Default logger using Laravel's logging system
36+
37+
#### New Commands
38+
* `mandate:health` - Check configuration and database health with `--fix` option
39+
* `mandate:sync` - Synchronize code-first definitions to database
40+
* `mandate:typescript` - Generate TypeScript constants for frontend
41+
* `mandate:upgrade-from-spatie` - Migrate from Spatie Laravel Permission
42+
* `mandate:make:permission` - Scaffold a new permission class
43+
* `mandate:make:role` - Scaffold a new role class
44+
* `mandate:make:capability` - Scaffold a new capability class
45+
* `mandate:make:feature` - Scaffold a new feature class (requires feature generator)
46+
47+
#### Authorizable Contract
48+
* Type-safe interface for models using Mandate authorization
49+
* Better IDE support and method documentation
50+
* Standardized authorization method signatures
51+
52+
#### Model ID Types
53+
* Support for `int`, `uuid`, or `ulid` primary keys
54+
* Configurable via `model_id_type` config option
55+
56+
#### Fluent Authorization API
57+
* Semantic method names: `grantPermission()`, `revokePermission()`, `assignRole()`, `removeRole()`
58+
* Context parameter support on all authorization methods
59+
* Feature bypass option for internal checks
60+
61+
#### Consolidated Migrations
62+
* Simplified migration structure with two main migration files
63+
* Optional label/description columns migration
64+
* Cleaner upgrade path for existing installations
65+
66+
### Breaking Changes
67+
68+
* PHP 8.4+ required
69+
* Laravel 11+ required
70+
* Spatie Laravel Permission dependency removed - now fully standalone
71+
* Migration structure has changed - see UPGRADE.md for migration instructions
72+
* Some method signatures have changed to support context parameter
73+
* Configuration file structure updated with new sections
74+
75+
### Migration from v1.x
76+
77+
See [UPGRADE.md](UPGRADE.md) for detailed migration instructions including:
78+
- Database migration updates
79+
- Configuration file changes
80+
- Code changes for new method signatures
81+
82+
383
## [1.4.0](https://github.com/offload-project/laravel-mandate/compare/v1.3.0...v1.4.0) (2026-01-03)
484

585

0 commit comments

Comments
 (0)