agentsclimarketplace

Laravel upgrade v13

Skill fusengine/agents/plugins/laravel-expert/skills/laravel-upgrade-v13

Use when upgrading a Laravel 12 application to Laravel 13.0 — composer bump, breaking changes, and Attributes migration.From its SKILL.md

Install
npx -y skills add fusengine/agents --skill laravel-upgrade-v13

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.4 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

<objective> Covers the full Laravel 12 → 13.0 upgrade path: the PHP 8.3 minimum requirement, composer commands to bump Laravel/PHPUnit 12/Pest 4/Tinker, mandatory breaking changes (VerifyCsrfToken → PreventRequestForgery, cache prefix hyphens, serializable_classes hardening, pheanstalk 8.0+ for Beanstalkd, Symfony 7.4/8.0 support), the optional Eloquent + Queue Attributes migration, and the Laravel Boost MCP automated `/upgrade-laravel-v13` path. Provides a phased checklist (pre-upgrade audit → composer bump → breaking-change fixes → attributes migration → validation). </objective>

Laravel 12 → 13 Upgrade Guide

Centralized upgrade path from Laravel 12.46 to Laravel 13.0 (released March 17, 2026).

Agent Workflow (MANDATORY)

Before ANY upgrade, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase — Audit current Laravel 12 patterns ($fillable, $tries, VerifyCsrfToken references)
  2. fuse-ai-pilot:research-expert — Verify latest Laravel 13 docs via Context7 (/laravel/docs/13.x/upgrade)
  3. fuse-laravel:laravel-expert — Apply Laravel 13 best practices

After upgrade, run fuse-ai-pilot:sniper for validation.


Overview

PhaseGoalEffort
1. Pre-upgrade auditDetect L12 patterns in codebase30 min
2. Composer bumpUpdate Laravel + PHPUnit + Pest + Tinker5 min
3. Breaking changes fixesApply mandatory L13 changes1-3 h
4. Attributes migrationEloquent + Queue properties → Attributes (optional)2-4 h
5. ValidationTests pass, CI green30 min

Most projects: < 1 day total.


Critical Rules

  1. PHP 8.3 minimum — Drop PHP 8.2 support before upgrading composer.
  2. PHPUnit 12 + Pest 4 required — bump dev dependencies first to catch test failures early.
  3. VerifyCsrfToken → PreventRequestForgery — rename middleware references in bootstrap/app.php and aliases.
  4. Cache prefix breaking change — hyphens replace underscores by default. Set CACHE_PREFIX, REDIS_PREFIX, SESSION_COOKIE to preserve old behavior if cache invalidation is unacceptable.
  5. Never mix Attributes + properties on the same Eloquent/Queue class — pick one source of truth per model/job.

Architecture

upgrade-path/
├── 1-composer/        # bump dependencies
├── 2-breaking-fixes/  # mandatory changes
├── 3-attributes/      # optional refactor to Attributes
└── 4-validation/      # tests + sniper

→ See composer-upgrade.md for exact commands.


Reference Guide

TopicReferenceWhen to consult
Composer commandscomposer-upgrade.mdBump dependencies
Breaking changesbreaking-changes.mdFix L13 mandatory updates
Attributes migrationattributes-migration.mdModernize Eloquent/Queue classes
Laravel Boost MCPlaravel-boost-mcp.mdAutomated /upgrade-laravel-v13
Checklistchecklist.mdStep-by-step validation

Quick Reference

Composer bump (5 min)

composer require laravel/framework:^13.0 laravel/tinker:^3.0
composer require --dev phpunit/phpunit:^12.0 pestphp/pest:^4.0
composer update

→ See composer-upgrade.md for full sequence.

Breaking change: PreventRequestForgery

// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->validateOrigin(except: [
        'stripe/*',
        'webhook/*',
    ]);
})

→ See breaking-changes.md for all 12 changes.

Cache prefix migration

# .env — preserve L12 underscore behavior
CACHE_PREFIX=laravel_cache
REDIS_PREFIX=laravel_database_
SESSION_COOKIE=laravel_session

→ See breaking-changes.md.


Best Practices

DO

  • Bump PHPUnit + Pest FIRST so failing tests appear before refactor
  • Run upgrade on a feature branch (feat/laravel-13-upgrade)
  • Use Laravel Boost MCP /upgrade-laravel-v13 for guided automation
  • Test in staging with real cache + queue workers before prod
  • Keep properties + Attributes migration as a SEPARATE PR (not bundled with breaking fixes)

DON'T

  • ❌ Skip the cache prefix env vars if you have warm caches in prod
  • ❌ Upgrade composer directly on main without CI verification
  • ❌ Mix #[Fillable] and $fillable on the same model
  • ❌ Forget pheanstalk/pheanstalk: ^8.0 if you use Beanstalkd
  • ❌ Leave new Model() calls inside service provider register() — throws LogicException in L13

What ships with it: 7 files

16.6 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.