Zum Inhalt springen

Laravel Release Notes

Einträge
733
Quellen
4
Zuletzt aktualisiert

Folge Laravel, um die Release Notes in deinen Feed zu holen.

Laravel Framework von Laravel

Laravel 13.x: Jobs können auf Worker-Signale reagieren

Das neue Interface Interruptible erlaubt laufenden Jobs, bei einem SIGTERM des Queue-Workers etwa Schleifen zu stoppen, Locks freizugeben oder den Zustand zu sichern.

Pull request by @jackbayliss

When a queue worker receives a SIGTERM during a deployment, any running job normally has no idea it's about to be cut off. The new Interruptible interface lets jobs react - stop loops, release locks, save state - before the worker shuts down.

use Illuminate\Contracts\Queue\Interruptible;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;

class SignalJob implements ShouldQueue, Interruptible
{
    use Queueable;

    protected bool $stop = false;

    public function handle(): void
    {
        while (!$this->stop) {
            sleep(1);
            // Do work...
        }
    }

    public function interrupted(int $signal): void
    {
        $this->stop = true;
    }
}

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Umgebungsfilter für schedule:list

Das neue Flag --environment bei schedule:list zeigt nur die Tasks an, die in der angegebenen Umgebung tatsächlich laufen.

Pull request by @m-fi

Running schedule:list on production used to show every registered task - including those that only run locally. A new --environment flag filters the output to just the tasks that actually run in the specified environment.

php artisan schedule:list --environment=production

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Option --stop-when-empty-for für den Queue-Worker

Die neue Option --stop-when-empty-for bei queue:work beendet den Worker, nachdem er eine festgelegte Anzahl Sekunden untätig war.

Pull request by @taylorotwell

A new --stop-when-empty-for option on queue:work stops the worker after it has been idle for a configurable number of seconds. Useful for auto-scaling setups where workers should wind down rather than sit idle indefinitely.

php artisan queue:work --stop-when-empty-for=60

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Schema-Helper foreignUuidFor

Der neue Migrations-Helper foreignUuidFor leitet Spaltenname, Zieltabelle und Primärschlüssel aus dem Model ab, wie foreignIdFor, jedoch für UUID-basierte Beziehungen.

Pull request by @Tresor-Kasenda

A new foreignUuidFor migration helper joins foreignIdFor in the schema builder. It infers the column name, related table, and referenced primary key from the model - the same convenience as foreignIdFor, but explicitly for UUID-backed relationships.

$table->foreignUuidFor(User::class)->constrained();

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: cache:clear kann per prohibit() gesperrt werden

ClearCommand (cache:clear) unterstützt nun prohibit(), denselben Schutzmechanismus wie bei db:fresh und migrate:fresh, etwa für gehostete Umgebungen.

Pull request by @jackbayliss

cache:clear now supports prohibit(), the same opt-in protection mechanism available on db:fresh, migrate:fresh, and other commands you'd want to block in hosted environments.

ClearCommand::prohibit($inHostedEnvironments);

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Parameter normalize für Str::studly() und Str::pascal()

Mit dem optionalen Parameter normalize: true werden komplett großgeschriebene Wortsegmente vor der Umwandlung in Kleinbuchstaben gesetzt, sodass etwa aus CBOR das Ergebnis Cbor wird; der Standardwert false erhält das bisherige Verhalten.

Pull request by @hotmeteor

All-caps strings like CBOR or ALL_CAPS used to pass through Str::studly() unchanged - ucfirst has nothing to do when every letter is already uppercase. An optional normalize: true parameter lowercases all-uppercase word segments before conversion, giving you the expected output.

Str::studly('CBOR', normalize: true)      // 'Cbor'
Str::studly('ALL_CAPS', normalize: true)  // 'AllCaps'

Mixed-case strings are left untouched, and the default is false so existing behavior is preserved.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel 13.x: JSON-Fehlerantworten für API-Routen standardmäßig

Neue Laravel-13.x-Anwendungen liefern bei Fehlern auf api/*-Routen standardmäßig JSON-Antworten, auch ohne Accept: application/json-Header, konfiguriert über shouldRenderJsonWhen() in bootstrap/app.php.

Pull request by @LucasCavalheri

New Laravel 13.x applications now return JSON error responses from api/* routes by default - no Accept: application/json header required from the client. Tools like Postman, curl, and API clients get sensible responses right away. The behavior is configured in bootstrap/app.php using the existing shouldRenderJsonWhen() API:

$exceptions->shouldRenderJsonWhen(
    fn (Request $request) => $request->is('api/*') || $request->expectsJson(),
);

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel 13.x: pao standardmäßig im Skeleton enthalten

nunomaduro/pao ist nun im Laravel-Basis-Skeleton enthalten und liefert in jeder neuen Anwendung strukturierte Ausgaben für KI-Agenten.

Pull request by @nunomaduro

nunomaduro/pao is now included in the base Laravel skeleton, bringing structured AI agent output to every new application out of the box.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Option mode für router.poll

Die neue Option mode bei router.poll() und usePoll steuert mit cancel, rest oder overlap, wie sich überlappende Polling-Anfragen verhalten.

Pull request by @pascalbaljet

When a polled request takes longer than the configured interval, subsequent requests can pile up on the server. A new mode option on router.poll() and usePoll gives you control over how overlapping requests are handled - cancel aborts any in-flight request before starting the next, rest waits the full interval after each response so requests never overlap, and overlap preserves the existing behavior.

router.poll(2000, {}, { mode: "cancel" });
router.poll(2000, {}, { mode: "rest" });

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Dynamische Daten in usePoll

usePoll akzeptiert nun als zweites Argument eine Funktion, die bei jedem Poll neu ausgewertet wird, sodass Anfragen stets aktuelle Daten enthalten.

Pull request by @pascalbaljet

usePoll previously captured its request options once at mount, so reactive values from props would go stale on every subsequent tick. You can now pass a function as the second argument - Inertia re-evaluates it on each poll, so your requests always carry fresh data.

usePoll(10_000, () => ({
    only: ["notifications"],
    data: { since: lastSeenAt },
}));

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: router.once für einmalige Events

Mit router.once() lassen sich einmalige Event-Listener registrieren, ohne remove() manuell im Callback aufrufen zu müssen.

Pull request by @sebastiandedeyne

Registering a one-time event listener previously meant calling remove() manually inside your own callback. router.once() handles the cleanup for you.

// Before
const remove = router.on("before", () => {
    remove();
    // ...
});

// After
router.once("before", () => {
    // ...
});

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: rescue-Slot für fehlgeschlagene Deferred Props

Ein neuer rescue-Slot wird gerendert, wenn eine Deferred Prop mit rescue: true serverseitig fehlschlägt, und bietet ein reloading-Flag zum Aufbau einer Retry-Oberfläche.

Pull request by @pascalbaljet

When a deferred prop throws on the server using rescue: true, the frontend previously had no way to surface the failure - users would sit on the loading fallback indefinitely. The new rescue slot renders when a prop has been rescued, with a reloading boolean so you can build a proper retry UI.

return Inertia::render('Dashboard', [
    'stats' => Inertia::defer(fn () => Github::stats(), rescue: true),
]);
<Deferred data="stats">
  <template #fallback>
    <div>Loading...</div>
  </template>

  <template #rescue="{ reloading }">
    <button :disabled="reloading" @click="router.reload({ only: ['stats'] })">
      Retry
    </button>
  </template>

  <StatsOverview :stats="stats" />
</Deferred>

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Besserer CSP-Support für Fortschrittsbalken und Fehlerdialog

Apps mit Content Security Policy können in createInertiaApp einmalig eine nonce setzen, die automatisch auf die von Inertia eingefügten Inline-Styles für Fortschrittsbalken und Fehlerdialog angewendet wird.

Pull request by @pascalbaljet

Apps enforcing a Content Security Policy can now configure a nonce once in createInertiaApp - it's applied automatically to the inline styles Inertia injects for the progress bar and error dialog.

createInertiaApp({
    nonce: "...",
});

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Fehlerdialog-iFrame wird gesandboxt

Der iframe im Fehlerdialog für Nicht-Inertia-Antworten erhält sandbox="allow-scripts", sodass enthaltene Skripte nicht mehr auf window.parent zugreifen können, ohne dass API-Änderungen nötig sind.

Pull request by @pascalbaljet

When Inertia displays a non-Inertia response in its error dialog, the content is rendered inside an iframe. This change adds sandbox="allow-scripts" to that iframe, blocking scripts inside from reaching window.parent and interacting with your application. No API changes required.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Neue host-Option für den SSR-Server

Der SSR-Server akzeptiert jetzt eine host-Option, mit der sich festlegen lässt, an welches Netzwerkinterface er gebunden wird, wobei der Standard weiterhin 0.0.0.0 bleibt.

Pull request by @pascalbaljet

The SSR server now accepts a host option to control which network interface it binds to. The default remains 0.0.0.0 so nothing changes unless you need it.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: Netzwerk-URLs für CSS-Assets im SSR-Dev-Server

Der SSR-Dev-Server greift auf die Netzwerk-URL zurück, wenn die lokale nicht verfügbar ist, was SSL-Zertifikatsfehler in Container- und Reverse-Proxy-Setups mit Vite behebt.

Pull request by @simonellensohn

When Vite runs inside a container or behind a reverse proxy with a custom server.host, it places the dev server address in resolvedUrls.network rather than resolvedUrls.local. The SSR dev server now falls back to the network URL when the local one isn't available, fixing SSL certificate errors in those container and proxy setups.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Inertia 3.x: withApp-Callback erhält Page-Props

Der withApp-Callback bekommt nun wie setup die initialen Page-props, was z. B. das Setzen einer Nutzer-Locale im SSR-Modus vereinfacht.

Pull request by @CL0Pinette

The withApp callback now receives the initial page props, giving it parity with setup. Use cases like setting a user locale in SSR mode - where the locale comes from page props - are now straightforward without falling back to setup.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Neuer Skill starter-kit-upgrade für Laravel Starter Kits

Der neue Claude-Code-Skill starter-kit-upgrade führt durch die Prüfung von Änderungen in den Starter Kits für Vue, React und Livewire, sodass nur gewünschte Features übernommen werden.

Pull request by @pushpak1300

Pulling in upstream starter kit improvements without clobbering your own customizations has always been a manual, risky process. The new starter-kit-upgrade Claude Code skill gives you a guided, audit-friendly path to review what's changed in the laravel/vue-starter-kit, laravel/react-starter-kit, or laravel/livewire-starter-kit and apply only the specific features you want.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel AI: Sub-Agents als Tools

Laravel-AI-Agents können nun an andere Agents delegieren, indem diese in tools() zurückgegeben werden, wobei Sub-Agents mit isoliertem Kontext laufen und per ActsAsTool Name und Beschreibung festlegen.

Pull request by @JVillator0

Laravel AI agents can now delegate to other agents. Return any agent from your tools() method and the parent's LLM will invoke it like any other tool, passing a task description and receiving the result back. Sub-agents run with isolated context - no conversation history bleeds across from the parent.

class ProjectManager implements Agent, HasTools
{
    use Promptable;

    public function tools(): iterable
    {
        return [
            new WebSearch,
            new ResearchAgent,
        ];
    }
}

Sub-agents implement ActsAsTool to declare their tool-facing name and description, keeping internal instructions away from the parent model:

class ResearchAgent implements Agent, HasTools, ActsAsTool
{
    use Promptable;

    public function name(): string { return 'research_agent'; }

    public function description(): string
    {
        return 'Research a topic in depth and return a summary.';
    }

    // ...
}

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel AI: Failover funktioniert jetzt beim Streaming

Streaming-Failover mit withModelFailover() greift nun korrekt auch bei Fehlern während der Stream-Iteration und löst das Event AgentFailedOver aus.

Pull request by @kachelle

Streaming failover with withModelFailover() wasn't actually working - errors during generator iteration happened outside the try-catch, so a rate-limited provider mid-stream would throw instead of trying the next one. Failover now kicks in properly during stream iteration, with the AgentFailedOver event dispatched as expected.

Originalquelle(öffnet in neuem Tab)Problem melden