npx skills add ...
npx skills add 1weiho/laravel-upgrade-skill --skill laravel-upgrade
Upgrade Laravel applications one major version at a time (9→10, 10→11, 11→12). Use when user wants to upgrade their Laravel framework version. Auto-detects current version from composer.json, identifies breaking changes, and applies necessary code fixes.
npx skills add 1weiho/laravel-upgrade-skill --skill laravel-upgrade
Upgrade Laravel applications one major version at a time. Supports: 9→10, 10→11, 11→12.
Read composer.json and find the laravel/framework version constraint:
Determine target version (current + 1). If already on Laravel 12, inform user they're on the latest supported version.
Based on detected versions, read the appropriate reference file:
| Current | Target | Reference File |
|---|---|---|
| 9.x | 10.x | references/from-9-to-10.md |
| 10.x | 11.x | references/from-10-to-11.md |
| 11.x | 12.x | references/from-11-to-12.md |
For each breaking change in the guide, scan the codebase and apply fixes:
High Impact (always check):
composer.json dependency versionsMedium Impact (check relevant files):
$dates property → $casts (9→10)(string) casting (9→10)HasUuids trait behavior change (11→12)Low Impact (check if patterns found):
Bus::dispatchNow, Redirect::home, etc.)After code fixes, update composer.json:
php artisan to verify framework bootsSearch composer.json for outdated constraints and update per guide.
Search pattern: protected \$dates\s*=
Migrations using ->change() must now include all modifiers:
// Before
$string = (string) DB::raw('select 1');
// After
$string = DB::raw('select 1')->getValue(DB::connection()->getQueryGrammar());// Before (implicit retention)
$table->integer('votes')->nullable()->change();
// After (explicit)
$table->integer('votes')->unsigned()->default(1)->nullable()->change();// Before (ordered UUIDv4)
use Illuminate\Database\Eloquent\Concerns\HasUuids;
// After (if you need UUIDv4 behavior)
use Illuminate\Database\Eloquent\Concerns\HasVersion4Uuids as HasUuids;