v3.0.0-beta1
Pre-release
Pre-release
·
55 commits
to 3.x
since this release
Immutable
release. Only release title and notes can be modified.
First public beta of level-up v3. Three breaking changes, four behavioural fixes, one migration stub repair, and a full upgrade guide.
Important
This is a pre-release. To install:
composer require cjmellor/level-up:^3.0@betaOr set "minimum-stability": "beta" in composer.json.
Upgrade from v2.x
See UPGRADE.md for the full v2.x → v3.0 section with Likelihood-of-Impact ratings, or use the new level-up-upgrade-v3 Boost skill for a step-by-step walkthrough.
Breaking changes
Multiplier::scopeTo(Model ...$models)removed — replaced with typedscopeToUser/scopeToTierplusunscopeFromUser/unscopeFromTier/isGlobal.multiplier_scopespolymorphic table replaced with two typed pivots (multiplier_user,multiplier_tier). Auto-backfill migration ships in v3. Removes theMorphToManyWithTextCastPostgres workaround from v2.1.'level-up.table'legacy config key removed (deprecated since v2.0).UserForeignKeyhelper class removed — replaced by$table->userForeignId()macro.- Trait method aliasing helpers removed — host User models with colliding trait methods need to rename or compose into a wrapper model.
setPoints()recalculates level and tier — firesUserLevelledUp/UserTierUpdatedevents when the new total implies a different placement.- Excess points cap at the top level instead of throwing.
Fixed
addPoints/deductPoints/setPointsare now atomic — wrapped inDB::transaction, with events implementingShouldDispatchAfterCommit.grantAchievement/incrementAchievementProgress/revokeAchievementclear the cachedachievements(and sibling) relations on the same instance.addPointsfirst-time-experience branch resolves starting level viaorderByDesc('level')to matchPointsIncreasedListener.alter_experience_audits_type_to_stringmigrationdown()now works on PostgreSQL.
Removed
Multiplier::scopeTo,Multiplier::scopesrelation.src/Models/MultiplierScope.php,src/Support/UserForeignKey.php.database/migrations/create_multiplier_scopes_table.php.stub.config('level-up.table'),config('level-up.models.multiplier_scope'),config('level-up.tables.multiplier_scopes').
Full changelog: v2.1.0...v3.0.0-beta1