mcpField
L
laravel:upgrade-13

laravel:upgrade-13

github.com/jpcaparasDevelopment15738 installsUpdated 17w ago
Repository

About laravel:upgrade-13

This skill guides developers through upgrading an application from Laravel 12 to Laravel 13. It combines dependency updates with a breaking-change checklist and verification steps.

Key features

  1. 01Laravel 13 prerequisite checks
  2. 02Dependency update guidance
  3. 03Breaking-change checklist
  4. 04Test and static-analysis verification
  5. 05Staging checks for key services

Use cases

  1. 01Plan a Laravel 12 to 13 upgrade
  2. 02Find affected cache and queue code
  3. 03Verify an upgrade before deployment

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jpcaparas/superpowers-laravel --skill laravel:upgrade-13

After installing, type/laravel:upgrade-13in Claude Code to confirm it loaded.

Details

From the project README

Upgrading to Laravel 13

Laravel 13 (released March 2026) is a deliberately small upgrade. Work through this checklist in a dedicated branch with green tests before and after.

Prerequisites

  • PHP 8.3+ (13.x supports PHP 8.3–8.5; 8.2 is dropped)
  • Green test suite on 12.x before starting

Commands

# Bump core dependencies in composer.json
"laravel/framework": "^13.0",
"laravel/tinker": "^3.0",
"phpunit/phpunit": "^12.0",
"pestphp/pest": "^4.0"

sail composer update                 # or: composer update

# Verify
sail artisan about                   # or: php artisan about
sail artisan test --parallel         # or: php artisan test --parallel

Breaking-Change Checklist

High impact:

  • Replace VerifyCsrfToken references with PreventRequestForgery (old name is a deprecated alias) — see laravel:request-forgery-protection
  • PHP 8.3 minimum; upgrade PHP before composer update

Medium impact:

  • config/cache.php gains serializable_classes (default false); allow-list any classes you store in cache as objects
  • upsert() now throws InvalidArgumentException on empty uniqueBy — fix call sites instead of relying on invalid SQL
  • Default cache prefixes / session cookie names switched underscores → hyphens; pin CACHE_PREFIX, REDIS_PREFIX, SESSION_COOKIE in .env if you relied on framework defaults (avoids logging everyone out and cold caches)

Low impact (scan if applicable):

  • Serialized Eloquent collections now restore eager-loaded relations (affects queued jobs)
  • JobAttempted event: $exceptionOccurred (bool) → $exception (?Throwable); QueueBusy: $connection → $connectionName
  • Domain routes now take precedence over non-domain routes during matching
  • MySQL DELETE with JOIN now compiles ORDER BY/LIMIT instead of silently dropping them
  • Custom cache stores need touch(); custom queue drivers need size-inspection methods

Patterns

  • Upgrade one major version at a time; never skip 12.x → 13.x steps
  • Read the full upgrade guide: https://laravel.com/docs/13.x/upgrade
  • Laravel Boost ^2.0 offers an AI-assisted /upgrade-laravel-v13 flow — useful, but review its diff like any PR
  • Adopt new 13.x features (attributes, JSON:API resources, AI SDK) in follow-up PRs, not the upgrade PR

Verification

  • Full test suite + static analysis (PHPStan) clean
  • Boot the app; verify sessions persist and caches warm correctly (prefix changes)
  • Exercise queues, scheduler, and webhooks in staging before production

Comments

Markdown supported