What problem does it solve?
Upgrading the cjmellor/level-up Laravel gamification package from v2.x to v3.0 involves many breaking changes—removed models, renamed methods, new config keys, and changed leaderboard return types—that are tedious and error-prone to apply manually across a codebase.
Core Features & Use Cases
- Automated Code Migration: Rewrites
Multiplier::scopeTo() calls into scopeToUser/scopeToTier, replaces UserForeignKey::on() with the userForeignId() Blueprint macro, and updates leaderboard consumers to the new LeaderboardEntry shape.
- Config and Migration Handling: Updates published
config/level-up.php (new models bindings, typed multiplier pivot tables, removed keys) and runs the v3 migrations that backfill challenge_completions and convert multiplier_scopes into typed pivots.
- Behavioral Audits: Flags
setPoints() callsites affected by the new level-recalculation behavior, removes obsolete addPoints() exception handlers, and resolves trait method collisions on the User model.
- Use Case: A developer runs
composer require cjmellor/level-up:^3.0, then uses this Skill to systematically find and fix every breaking change, run the migrations, and verify the test suite passes.
Quick Start
Upgrade my Laravel app from cjmellor/level-up v2 to v3 and apply all the breaking changes to my codebase.