Upgrade
Added
- Laravel 13 model attributes (
#[Table],#[Fillable],#[UseFactory]) and job attributes (#[Tries],#[Timeout],#[DeleteWhenMissingModels]) - Optional
Queue::route()configuration viaachievements.jobs.queue/connection - Criteria class allowlist (
achievements.criteria) for safer JSON deserialization ComparisonOperatorenum forTimeSinceCriteria- Unique index on reputation morph columns
- Cache TTL extension via
Cache::touch()on achievement cache hits FieldCompareCriteria,FieldInCriteria, andFieldIsNullCriteriafor richer user-field checksDateBetweenCriteria,DayOfWeekCriteria,MonthCriteria, andTimeOfDayCriteriafor calendar/time windowsHasRelationSumCriteriafor summing a relation column against a threshold- Shared
RelationCriteriabase with optional$wherefilters (associative maps or field/operator/value lists, includingLIKE) on relation count, exists, and sum criteria
Changed
- Breaking: Requires Laravel 13+ and PHP 8.3+
- Breaking: Achievement events cache key renamed to
bradietilley_achievements.events - Breaking:
TimeSinceCriterianow requiresComparisonOperatorandCarbon\Unit(string operators/units removed) - Achievement cache is lazy-loaded on first read instead of regenerating on every boot
- Async
ProcessAchievementjobs now receive the event payload - Breaking: Async
ProcessAchievementjobs snapshotCarbonImmutable $nowat dispatch;Criteria::isEligible()requires$nowand date/time criteria use it instead ofCarbon::now() - Unique constraint conflict detection uses
UniqueConstraintViolationException Achievement::findByName()resolves through the configured model alias and cacheHasRelationCountCriteriaandHasRelationExistsCriteriaextend sharedRelationCriteriaand accept an optional$wherefilter
Fixed
- Stale per-achievement name cache inconsistency by resolving names from the achievements collection
[0.1.0] - 2026-07-19
Added
- Initial release with achievement criteria, reputation tracking, and event-driven grants
- Support for Laravel 12 and Laravel 13
- Support for PHP 8.2+
Fixed
- Added missing
asynccolumn to the achievements migration - Fixed
HasAchievementsCriteriaeligibility checks to use achievement IDs - Fixed
Criteria::toArray()to return named property keys - Made unique-constraint handling work across SQLite, MySQL, and PostgreSQL
- Prevented the wildcard event listener from booting models during migrations (Laravel 13)
Changed
- Persist achievement criteria as JSON class payloads instead of PHP
serialize() - Align achievement cache writes and reads on a shared TTL
- Updated CI to test Laravel 12/13 across supported PHP versions
- Dropped Laravel 11 support