Repository navigation
Immutable
release. Only release title and notes can be modified.
Patch release: concurrency, event-timing and validation fixes across the entitlements core and the Filament plugin, a new unique index on plan item types, and Laravel Boost AI guidelines for host applications.
Fixed
- Slot release race —
SlotStrategy::requestRelease()now locks and re-checks the usages it is about to mark: a usage already released can no longer revert toReleasingand double-decrementslot_used.forceRelease()decrements by the usage amount instead of always 1. - Concurrent
changePlan()— the anchor license is locked before reading pending transitions, so two concurrent calls can no longer leave two pending transitions on the same anchor. - Plan changes towards empty plans are rejected upfront (
IncompatiblePlanTransition) instead of failing after commit with an inconsistentFailedtransition. - Computed-type downgrades are validated against the registered resolver, so a downgrade below current computed usage is refused like any other type.
License::nextBillingAt()returnsends_atfor non-recurring plans instead of projecting a billing period that will never recur.entitlements.models.*overrides are honored across theEntitlementsservice and all strategies (previously some queries used the package models directly).type_enumconfig validation reports actionable errors and label resolution tolerates enums whosegetLabel()returnsnull.- Filament — Force Release Slot operates on releasing usages across the whole license group (anchor + children), not only the selected license.
- Filament — plan deletion: single and bulk delete are blocked for plans still referenced by licenses or plan transitions.
- Filament — plan form: the item-type repeater prevents selecting the same type twice (the database now enforces it too, see Changed).
- Filament — change plan: the current plan stays visible (disabled) in the select, and
TransitionAlreadyResolvedis handled with a user-facing notification instead of a 500. - Dropped
HasTranslationsmethods that delegated to non-existent parent methods.
Changed
- Domain events dispatch after the surrounding transaction commits (
DB::afterCommit). Listeners no longer observe uncommitted state and are not invoked at all when the transaction rolls back. - New migration adds a unique index on
entitlement_plan_items (plan_id, type), enforcing one item per type per plan at the database level. Re-publish the migrations (vendor:publish --tag="entitlements-migrations") and runphp artisan migrate. - Translations publish to
lang/vendor/laravel-entitlements/(the standard vendor path) instead of the app's rootlang/directory. Move any customized copies to the vendor subdirectory.
Dependencies
filament-badgeable-columnis constrained to^4.0: the previous wildcard let prefer-lowest builds resolve a Filament 3 release with an unregistered view namespace, breaking table rendering.
Documentation
- Laravel Boost AI guidelines shipped at
resources/boost/guidelines/laravel-entitlements/— strategy semantics, plan/item invariants, transition validation rules, the post-commit event guarantee, exceptions, HTTP resources and common pitfalls for AI assistants in host apps. - README:
plan_transitionconfig keys, the fourPlanTransitionevents, the complete exceptions reference, the vendor translations path and a Boost section. - The
Entitlementsfacade docblock declareschangePlan(),cancelTransition()andapplyDueTransitions().
Tests
- Suite grown from 126 to 135 tests (433 assertions), including regression tests for every fix above.
Full Changelog: 1.3.0...1.3.1