Laravel 13.42.0 landed on 10 November 2026, and it is a small release with a sharp edge: typed UUID and ULID input straight from the request, an event that fires when a migration fails mid-deploy, and scheduler skip reasons that finally tell you why a task did not run. It also arrives one week after Laravel 13.40, which fixed a remote code execution flaw in the Concurrency facade — so this post covers both. If you run Laravel in production, the 13.40 patch is the urgent part and the 13.42 features are the useful part. Upgrade first, then adopt the new helpers.
One version quirk to know before you update: 13.41.0 was tagged on 10 November at 15:44 UTC, and 13.42.0 followed twelve minutes later with only a version bump. Running composer update laravel/framework lands you on 13.42.0 with the same code as 13.41.0. There is no separate 13.41 feature set to chase.
Facts verified 14 November 2026 against the Laravel News release notes for 13.40 and 13.42, the framework changelog, and the endoflife.date support timeline.
Upgrade first: one command
composer update laravel/framework
php artisan --version
# Laravel Framework 13.42.0
These are weekly patch releases, not a major upgrade. There is no upgrade guide, no breaking change, and no config to republish. If you are on 13.x already, the update is a patch-level bump. If you are still on 12.x, the 13.40 security fix was backported to 12.71.0 — update to that at minimum. Laravel 11 stopped receiving security fixes on 12 March 2026, so 11.x apps get neither fix. And remember that Laravel 13 needs PHP 8.3 or newer, while PHP 8.2 stops receiving security fixes on 31 December 2026 — two deadlines that are now six weeks apart.
Typed UUID and ULID input: $request->uuid() and $request->ulid()
This is the headline feature, and it is the one you will actually use every week. Until now, pulling a UUID out of a request meant fetching a string, checking it was not empty, and parsing it yourself:
// Before 13.42: the manual version
use Ramsey\Uuid\Uuid;
$raw = $request->input('order_id');
$orderId = $raw ? Uuid::fromString($raw) : null;
// Throws InvalidUuidStringException on junk —
// but only after you remembered the null check.
Laravel 13.42 adds uuid() and ulid() next to the existing date() and enum() helpers on the request:
$request->uuid('order_id'); // Ramsey\Uuid\UuidInterface|null
$request->ulid('order_id'); // Symfony\Component\Uid\Ulid|null
$request->safe()->uuid('order_id'); // Works on validated input too
Three behaviours to know:
- Missing or empty input returns
null. No exception, no empty string — the same contract asdate()andenum(). - Invalid input throws. A malformed UUID throws
InvalidUuidStringException; a malformed ULID throwsInvalidArgumentException. That is the correct behaviour for an API — junk input should fail loudly — but it means you should validate first or catch the exception in a controller that accepts user input. Do not calluuid()on raw, unvalidated input in a public endpoint and let the exception become a 500. ulid()will not convert a UUID. Pass a UUID string toulid()and it throws instead of silently turning it into a different ULID. That is deliberate: a UUID and a ULID are different identifiers, and quietly converting one into the other would hide a bug.
The methods live on the InteractsWithData trait, so they are not limited to HTTP requests. They also work on Fluent objects, validated input via $request->safe(), URI query strings, Blade component attributes, and console input. Anywhere you currently parse an ID string by hand, this replaces it.
Where it pays off fastest: route-model-style lookups where the identifier comes from a query string or a form field rather than a route parameter. Compare the old shape — fetch, null-check, parse, catch — with a single typed call that returns an object you can pass straight to a query:
// After 13.42
$orderId = $request->uuid('order_id');
$order = $orderId
? Order::where('uuid', $orderId->toString())->firstOrFail()
: abort(400, 'order_id is required');
MigrationFailed: get told when a deploy migration breaks
The second feature is aimed squarely at deploys. Laravel 13.42 adds a MigrationFailed event that fires when a migration throws. It carries the same migration, method, and name properties as the other migration events, plus the exception. The exception is still thrown after the event fires, so your deploy still fails — the event just gives you a hook to react before users hit the damage:
use Illuminate\Database\Events\MigrationFailed;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Log;
Event::listen(function (MigrationFailed $event) {
Artisan::call('down');
Log::channel('slack')->critical("Migration [{$event->name}] failed", [
'exception' => $event->exception->getMessage(),
]);
});
Why this matters more than it looks: on MySQL, schema changes such as ALTER TABLE are not rolled back when a later statement in the same migration fails. A migration that dies halfway can leave your schema half-applied — a column added but an index missing, or a table renamed with its foreign keys pointing at the old name. Before 13.42, your deploy script had to catch the exception itself to notice. Now the framework tells you, in the same place you already listen for MigrationStarted and MigrationsEnded.
Register the listener in your AppServiceProvider or an event-service-provider, and pair it with the deploy rule you should already have: run migrations with php artisan migrate --force in CI or your deploy script, never by hand on the server, and keep a tested rollback path for the schema change you are shipping. The event does not roll anything back for you — it buys you minutes, not a fix. If you want the full picture, our guide to fixing Laravel migration SQLSTATE errors covers the most common failure modes this event will surface.
Scheduler skip reasons, and a schedule:list fix
The scheduler got two smaller improvements that fix real annoyances. First, the ScheduledTaskSkipped event — dispatched when an onOneServer() task already ran on another server — now carries a reason property. It holds a ScheduledTaskSkipReason enum with three cases: ConditionNotMet, Paused, and RanOnAnotherServer:
use Illuminate\Console\Scheduling\Events\ScheduledTaskSkipped;
use Illuminate\Support\Facades\Event;
Event::listen(function (ScheduledTaskSkipped $event) {
Log::info('Scheduled task skipped', [
'task' => $event->task->getSummaryForDisplay(),
'reason' => $event->reason?->value,
]);
});
If you run scheduled tasks across multiple servers, this is the difference between “the task did not run” and “the task did not run because another server already ran it” — which is the difference between a 2 a.m. page and going back to sleep.
Second, schedule:list --json now returns each task’s own cron expression and timezone. Before, every expression was converted to the app timezone, so stored output was off by an hour after a DST change. Passing --timezone still converts every task to that timezone. If you parse this JSON in monitoring or a dashboard, check any task that sets its own timezone() — its expression, timezone, and next_due_date values change.
Detect your own lost connections
Laravel reconnects to the database when an exception matches a list of known lost-connection messages. Some setups hit connection errors that are not on that list — Vitess with the vttablet proxy is the example in the release notes. The new LostConnectionDetector::detectUsing() method lets you add your own check without binding a custom detector:
use Illuminate\Database\LostConnectionDetector;
LostConnectionDetector::detectUsing(function (Throwable $e) {
return str_contains($e->getMessage(), 'vttablet: rpc error');
});
When your callback returns false, Laravel falls through to its built-in messages. Register it early — in a service provider’s boot() method — so it is in place before the first query. This pairs with the 13.40 transaction fix below: a connection that drops inside a transaction now discards the dead PDO and reconnects on the next query, instead of failing every later transaction with “There is already an active transaction” until a queue worker or Octane process restarts.
Uri::origin() for comparing origins
The Uri class gains an origin() method that returns the scheme, host, and port, normalised — so https://App.example.com:443 becomes https://app.example.com:
use Illuminate\Support\Uri;
$sameOrigin = Uri::of($first)->origin() === Uri::of($second)->origin();
Use it wherever you compare origins — webhook signature checks, CORS allowlists built by hand, redirect validation — instead of string-comparing URLs and getting bitten by case, default ports, or a trailing slash. One requirement: the framework now needs league/uri 7.6 or later. Composer handles that on update, but check if you have the package pinned in your composer.json.
What you missed in 13.40: slow-job alerts, replica commit IDs, and a security fix
Laravel 13.40.0 shipped on 3 November, a week before 13.42, and it is the release with the security fix. If you updated straight from 13.39 to 13.42, you already have all of it — but you should know what changed.
Alerts for jobs and tasks that run too long
Queue::whenJobRunsLongerThan() runs a callback when a job attempt takes longer than a threshold, and Schedule::whenTaskRunsLongerThan() does the same for scheduled tasks. Laravel already had DB::whenQueryingForLongerThan() and similar methods for requests and commands; queues were the gap:
use Carbon\CarbonInterval;
use Illuminate\Support\Facades\Queue;
Queue::whenJobRunsLongerThan(CarbonInterval::seconds(90), function ($job, $duration) {
Log::warning("{$job->resolveName()} took {$duration}ms");
});
Watch the units: for jobs, a plain number is read as milliseconds and the duration passed to the callback is in milliseconds. For scheduled tasks, a plain number is read as seconds and the runtime is in seconds. The job callback listens to the JobAttempted event, so it also runs for attempts that fail or are released back to the queue. Register these in a service provider and point them at the same channel your other alerts use — a slow job is usually the first symptom of a stuck queue, not a curiosity.
Commit IDs: stop guessing whether a replica has caught up
Laravel 13.38 added the PreventStaleDatabaseReads middleware, which sends reads to the write server for a fixed time after a write. That works, but the fixed window is a guess. 13.40 adds commit IDs so you can check the replica instead of guessing how long the lag is:
use Illuminate\Support\Facades\DB;
// After a write, on the primary
$order = $user->orders()->create($attributes);
$commitId = DB::getLastCommitId();
// Later, on a replica
DB::hasCommitId($commitId); // Check now
DB::hasCommitId($commitId, wait: 2); // Wait up to two seconds
A mergeCommitIds() method combines several commit IDs into one, so you can wait for all of them at once. The methods work on MySQL with GTIDs enabled, MariaDB with the binary log enabled, and PostgreSQL — waiting on PostgreSQL requires PostgreSQL 19. Other drivers throw a RuntimeException. If you run read replicas, this is the precise version of the 13.38 middleware: use the middleware as the safety net and commit IDs where a specific read must see a specific write.
Middleware ordering without declaring the whole stack
insertBefore() and insertAfter() on the middleware configuration in bootstrap/app.php let you place your middleware relative to one of Laravel’s defaults, without declaring the stack yourself:
->withMiddleware(function (Middleware $middleware) {
$middleware->insertAfter(TrustProxies::class, StripCrossOriginReferer::class);
$middleware->insertBefore(TrimStrings::class, SanitizeStrings::class);
})
insertBeforeInGroup() and insertAfterInGroup() do the same for a middleware group such as web, and replace() now accepts an array of replacements.
Strict input casting
A strict argument on string(), str(), boolean(), integer(), and float() stops silent coercion. Without it, ?count=abc123 casts to 0; with strict: true it returns the default instead. In strict mode, boolean() only accepts 1, true, on, yes, 0, false, off, and no. Use it on any input that feeds a query, a pagination size, or a money amount — the places where a silent 0 is a bug, not a default.
The Concurrency fix: update if you use Concurrency::run()
This is the urgent one. 13.40 fixes a remote code execution issue in Concurrency::run() with the default process driver, reported by GitHub user Arr0way. The parent process read a task’s result from the child process’s output and unserialised it — so a task that printed user-controlled text could write a fake result, which the parent then unserialised. The child process now writes its result in a frame signed with a random key the parent creates for each task, and the parent ignores any frame the key does not verify. The fix also stops the “Trying to access array offset on null” error that a task printing any output could cause.
If your application uses Concurrency::run() with the process driver, update to 13.40.0 or newer — 13.42 includes the fix. The same signed-envelope fix was backported to Laravel 12.71.0. It is the third Laravel security fix in about a month, after the TokenGuard auth bypass (CVE-2026-114509) in October — a reminder that the framework’s weekly releases are not only features. Check whether you use it:
grep -rn "Concurrency::run" app/ routes/ --include="*.php"
The upgrade checklist
- Run
composer update laravel/frameworkand confirmphp artisan --versionreports 13.42.0. - Search for
Concurrency::runin your codebase. If it is there, confirm you are on 13.40.0 or newer — do not stop at 13.39. - On 12.x? Update to 12.71.0 or newer for the Concurrency backport, and plan the move to 13: 12.x gets security fixes only until 24 February 2027.
- On 11.x or older? You are out of security support since 12 March 2026. Neither fix reaches you.
- Check your PHP version. Laravel 13 needs PHP 8.3+, and PHP 8.2 security support ends 31 December 2026.
- If you parse
schedule:list --jsonoutput, review tasks that set their owntimezone()— their expression and next-due values change. - If you pin
league/uriincomposer.json, make sure the constraint allows 7.6 or later. - Run your test suite and your queue workers after the update, then check the scheduler output once:
queue:worknow showsRELEASEDinstead ofDONEfor jobs released back to the queue.
What to adopt first
Start with the patch, then the two features that change daily work. The Concurrency fix is non-negotiable if you use the process driver. After that, $request->uuid() and $request->ulid() belong in every new controller that takes an ID from input — they delete a whole class of null-check-and-parse boilerplate. The MigrationFailed listener belongs in your deploy path, not in a controller: register it once and let it page you the next time a migration dies halfway. The slow-job and slow-task alerts are a five-minute addition to a service provider that pays for itself the first time a queue stalls silently. The rest — commit IDs, Uri::origin(), strict casting, middleware insertion — adopt when you touch the code they improve. None of it needs a refactor; all of it is available the moment you update.
Further Reading & References
- UUID Request Input and Migration Failure Events in Laravel 13.42 — Laravel News release notes for 13.42.0, published 11 November 2026
- Slow Job Alerts and Replica Commit IDs in Laravel 13.40 — Laravel News release notes for 13.40.0, including the Concurrency security fix
- Laravel 13.41: Signed URL Fix, request uuid() and More — the 13.41/13.42 tagging timeline and the nested validation bypass fix
- This week in Laravel & Inertia: Laravel 12.71 (Nov 9, 2026) — the 12.x backport of the Concurrency fix
- Laravel 13.40 Security Fix: Is Your App Up to Date? — support timelines and the three-fixes-in-a-month context
- Laravel end-of-life dates & support status — 13.42.0 latest, 12.x security support until 24 February 2027, 11.x end of life
- Authenticate the Concurrency Process Result Envelope (PR #62297) — the framework pull request behind the signed-result fix
- Laravel 13.38: PreventStaleDatabaseReads and replica lag — the release that introduced the middleware the 13.40 commit IDs now complement
Internal reading on HowToShipIt: our Laravel 13.38 guide covers the PreventStaleDatabaseReads middleware, our CVE-2026-114509 TokenGuard guide covers October’s auth-bypass fix, and our Laravel migration SQLSTATE guide covers the errors the new MigrationFailed event will surface.



