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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "laravel-upgrade" with this command: npx skills add 1weiho/laravel-upgrade-skill/1weiho-laravel-upgrade-skill-laravel-upgrade

Laravel Upgrade

Upgrade Laravel applications one major version at a time. Supports: 9→10, 10→11, 11→12.

Workflow

1. Detect Current Version

Read composer.json and find the laravel/framework version constraint:

// Example: "laravel/framework": "^10.0" means Laravel 10.x

Determine target version (current + 1). If already on Laravel 12, inform user they're on the latest supported version.

2. Load Upgrade Guide

Based on detected versions, read the appropriate reference file:

3. Scan and Fix

For each breaking change in the guide, scan the codebase and apply fixes:

High Impact (always check):

  • composer.json dependency versions
  • PHP version requirements
  • Database migrations using deprecated methods

Medium Impact (check relevant files):

  • Model $dates property → $casts (9→10)
  • Database expressions with (string) casting (9→10)
  • Column modification migrations missing attributes (10→11)
  • HasUuids trait behavior change (11→12)

Low Impact (check if patterns found):

  • Deprecated method calls (Bus::dispatchNow, Redirect::home, etc.)
  • Contract interface changes
  • Configuration file updates

4. Update Dependencies

After code fixes, update composer.json:

# Update laravel/framework constraint to target version
# Update related packages per upgrade guide
composer update

5. Post-Upgrade Verification

  • Run php artisan to verify framework boots
  • Run test suite if available
  • Check for deprecation warnings in logs

Common Patterns

Dependency Updates (all upgrades)

Search composer.json for outdated constraints and update per guide.

Model $dates to $casts (9→10)

// Before
protected $dates = ['deployed_at'];

// After
protected $casts = ['deployed_at' => 'datetime'];

Search pattern: protected \$dates\s*=

Database Expression Casting (9→10)

// Before
$string = (string) DB::raw('select 1');

// After
$string = DB::raw('select 1')->getValue(DB::connection()->getQueryGrammar());

Column Modification (10→11)

Migrations using ->change() must now include all modifiers:

// Before (implicit retention)
$table->integer('votes')->nullable()->change();

// After (explicit)
$table->integer('votes')->unsigned()->default(1)->nullable()->change();

HasUuids Trait (11→12)

// Before (ordered UUIDv4)
use Illuminate\Database\Eloquent\Concerns\HasUuids;

// After (if you need UUIDv4 behavior)
use Illuminate\Database\Eloquent\Concerns\HasVersion4Uuids as HasUuids;

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

github-tools

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.

Archived SourceRecently Updated
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated