Zum Inhalt springen

Laravel Release Notes

519 Einträge aus 4 Quellen. Zuletzt aktualisiert:

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Socialite: Optionale Unique-Indexing-Jobs gegen doppeltes Scout-Reindexing

Die neuen optionalen Job-Varianten MakeSearchableUnique und RemoveFromSearchUnique stellen sicher, dass pro Modell nur ein Indexierungs-Job in der Queue liegt, und erfordern einen Standard-Cache-Store.

Pull request by @stevebauman

If the same model gets saved multiple times in quick succession, Scout can end up queuing redundant indexing jobs for it. The new unique job variants - MakeSearchableUnique and RemoveFromSearchUnique - implement ShouldBeUniqueUntilProcessing, so only one job per model sits in the queue at a time. Opt in by registering them in a service provider.

use Laravel\Scout\Scout;
use Laravel\Scout\Jobs\MakeSearchableUnique;
use Laravel\Scout\Jobs\RemoveFromSearchUnique;

Scout::makeSearchableUsing(MakeSearchableUnique::class);
Scout::removeFromSearchUsing(RemoveFromSearchUnique::class);

These require a default cache store, so they're opt-in rather than the new default.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Socialite: Fake-Benutzer einfacher mit User::fake() erstellen

Mit der neuen statischen Methode User::fake() lassen sich Socialite-Testbenutzer mit nur den benötigten Attributen erzeugen, den Rest füllen Standardwerte, auch für OAuth-1-Benutzer.

Pull request by @stevebauman

Setting up a fake Socialite user in tests used to require constructing and mapping an attribute array by hand before passing it to Socialite::fake(). The new User::fake() static method takes care of all of that - pass only the attributes you care about and sensible defaults fill in the rest.

// Before
Socialite::fake('github', (new User)->setRaw($attributes)->map($attributes)
    ->setToken('fake-token')
    ->setRefreshToken('fake-refresh-token')
    ->setExpiresIn(3600)
    ->setApprovedScopes([]));

// After
Socialite::fake('github', User::fake([
    'email' => 'test@example.com',
]));

Works for OAuth 1 users too, via \Laravel\Socialite\One\User::fake().

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Laravel Framework 13.18.0

Version 13.18.0 reduziert Cache-Zugriffe bei debounced Jobs, ergänzt prioritätsbasierte Registrierung für Dev-Befehle und Informationen im WorkerStopping-Event und behebt mehrere Fehler, etwa bei Cache-Headern auf HEAD-Requests, RateLimited-Middleware und Number::forHumans().

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

schema:dump mit Flag --without-migration-data

Der Befehl schema:dump akzeptiert jetzt das Flag --without-migration-data, das die Zeilen der Migrationstabelle aus dem Dump entfernt und nur die Struktur ausgibt.

Pull request by @jackbayliss

schema:dump now accepts a --without-migration-data flag that strips migration table rows from the output, leaving you with a clean structural dump. Handy for test environments where you want to seed the schema without carrying over migration history from another environment.

php artisan schema:dump --without-migration-data

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

between()/unlessBetween() unabhängig von der timezone()-Reihenfolge

Wird between() oder unlessBetween() vor timezone() aufgerufen, wird die angegebene Zeitzone nun korrekt berücksichtigt, weil die Zeitprüfung erst bei Ausführung des Filters erfolgt.

Pull request by @ManicardiFrancesco

Previously, calling between() or unlessBetween() before timezone() in a schedule chain would silently use UTC regardless of what timezone you specified - a subtle bug that could have scheduled tasks running at the wrong hour in production. The time-interval check is now deferred until the filter executes, so the order no longer matters.

// Both of these now behave identically
$schedule->command('foo')->timezone('Europe/Rome')->between('10:00', '12:00');
$schedule->command('foo')->between('10:00', '12:00')->timezone('Europe/Rome');

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Neuer Befehl php artisan dev

php artisan dev startet Server, Queue Worker, Log-Tailing und Vite gleichzeitig mit farblich getrennter Ausgabe, erkennt den Node-Paketmanager automatisch und lässt sich über Service Provider um weitere Befehle erweitern.

Pull request by @joetannenbaum

php artisan dev brings all your development processes together in one command - server, queue worker, log tailing, and Vite running concurrently, each with its own color-coded output. It replaces the composer dev script with a proper Artisan convention and auto-detects your Node package manager (npm, yarn, pnpm, or bun).

You can register additional commands from a service provider - useful for tools like Reverb or Stripe's CLI webhook listener:

use Illuminate\Foundation\Console\DevCommands;

DevCommands::artisan('reverb:start', 'reverb')->orange();
DevCommands::register('stripe listen --forward-to ' . config('app.url'))->green();

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Maintenance-Mode-Treiber array für paralleles Testen

Ein neuer In-Memory-Treiber array hält den Maintenance Mode pro Prozess isoliert und vermeidet so Race Conditions bei parallelen Test-Suites.

Pull request by @ziadoz

Parallel test suites and the file-based maintenance mode driver don't mix well - shared state on disk leads to race conditions between workers. The new in-memory array driver keeps maintenance mode isolated per process, mirroring the same pattern used by the cache and session drivers. No more flaky tests caused by leftover maintenance mode files.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Neue Methode whenFilledEnum in InteractsWithData

whenFilledEnum() führt den Callback nur aus, wenn der Schlüssel vorhanden ist und der Wert einem gültigen Enum-Case entspricht, und übergibt eine typisierte Enum-Instanz.

Pull request by @astandkaya

Working with backed enums in request data used to mean a whenFilled() call followed by a tryFrom() check and a null guard. whenFilledEnum() collapses all of that into a single method that only fires the callback when the key is present, the value maps to a valid enum case, and you get a typed enum instance in the closure - no manual validation needed.

// Before
$request->whenFilled('status', function (string $input) use ($query): void {
    $status = Status::tryFrom($input);
    if ($status === null) {
        return;
    }
    $query->where('status', $status);
});

// After
$request->whenFilledEnum('status', Status::class, function (Status $status) use ($query): void {
    $query->where('status', $status);
});

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

anyOf-Unterstützung in JSON Schema

Illuminate\JsonSchema unterstützt jetzt anyOf, was für KI-Szenarien mit strukturierter Ausgabe nützlich ist, in denen ein Feld mehrere unterschiedliche Formen annehmen kann.

Pull request by @dbpolito

Illuminate\JsonSchema now supports anyOf, which is essential for AI structured output scenarios where a field can resolve to one of several distinct shapes. Both OpenAI and Gemini support anyOf in their structured output APIs, so this unlocks more expressive schema definitions when building AI-powered features with Laravel AI.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Neu: Bus::bulk() für effizientes Queueing vieler Jobs

Bus::bulk() gruppiert Jobs nach Queue und Connection und führt pro Gruppe nur einen einzigen Bulk-Insert aus, statt jeden Job einzeln zu schreiben.

Pull request by @jackbayliss

When you need to queue a large number of jobs at once, Bus::bulk() is the most efficient way to do it. Rather than dispatching jobs one by one (one database insert each) or using a batch (which writes on every completion), Bus::bulk() groups jobs by queue and connection and performs a single bulk insert per group. No overhead, no per-job write costs.

Bus::bulk(
    $users->map(fn (User $user) => new ProcessUser($user))->all()
);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

attachFromStorage-Helfer für Notification MailMessage

MailMessage in Notifications bietet nun attachFromStorage() und attachFromStorageDisk(), um Dateien direkt aus dem Storage anzuhängen, wie es bei Mailable schon möglich war.

Pull request by @LucasCavalheri

MailMessage in notifications now has attachFromStorage() and attachFromStorageDisk() methods, matching what Mailable has offered for a while. Attach invoices, reports, or any file from your storage layer without having to read the contents yourself first.

(new MailMessage)
    ->attachFromStorage('invoices/1.pdf')
    ->attachFromStorageDisk('s3', 'invoices/1.pdf', 'Invoice.pdf', [
        'mime' => 'application/pdf',
    ]);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Multi-Type-Unions in Illuminate\JsonSchema

Illuminate\JsonSchema kann nun Schemas mit mehreren Typen im Feld type (z. B. ['string', 'number', 'boolean']) darstellen, statt wie bisher eine Exception zu werfen.

Pull request by @pushpak1300

Illuminate\JsonSchema can now represent multi-type union schemas - schemas where the type field is an array like ['string', 'number', 'boolean']. This comes up frequently with third-party MCP tool schemas where mixed types are common. Previously these would throw an exception; now they deserialize, serialize, and round-trip correctly.

// Now works where it used to throw
JsonSchema::fromArray(['type' => ['string', 'number', 'boolean']]);

// Or build one directly
JsonSchema::union(['string', 'number'])->nullable();

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Cache::rememberWithState()

Cache::rememberWithState() liefert neben dem gecachten Wert auch einen booleschen Hinweis, ob es ein Treffer oder Fehlschlag war.

Pull request by @cosmastech

Cache::rememberWithState() returns both the cached value and a boolean indicating whether it was a hit or miss - useful for debugging, recording cache metrics, or surfacing cache status in response headers without having to check the cache twice.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Parameter normalize für Str::studly() und Str::pascal()

Mit normalize: true werden komplett großgeschriebene Wortsegmente vor der Umwandlung kleingeschrieben, sodass etwa aus CBOR das Ergebnis Cbor wird.

Pull request by @hotmeteor

All-uppercase strings like CBOR or ALL_CAPS now have a path through Str::studly() and Str::pascal() that produces the expected output. Pass normalize: true and any fully-uppercased word segment gets lowercased before conversion - mixed-case strings are left alone as before.

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

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Client\Request::uri() im HTTP-Client

Das Request-Objekt des HTTP-Clients hat jetzt eine uri()-Methode, die eine Illuminate\Support\Uri-Instanz zurückgibt und Prüfungen in Http::assertSent() vereinfacht.

Pull request by @stevebauman

The HTTP client's Request object now has a uri() method that returns an Illuminate\Support\Uri instance, consistent with the uri() method already available on Illuminate\Http\Request. This makes Http::assertSent() callbacks a lot cleaner when you need to inspect the URL.

Http::assertSent(function (Request $request) {
    return $request->uri()->path() === '/api/users'
        && $request->uri()->query()->integer('page') === 2;
});

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: Page-Objekt im titleCallback

Die Funktion titleCallback erhält nun das vollständige page-Objekt als zweites Argument, sodass Page Props und Metadaten für den Dokumenttitel nutzbar sind.

Pull request by @mrleblanc101

The titleCallback function now receives the full current page object as a second argument, giving you access to page props and metadata when constructing the document title. Useful when you want to build a title from data that lives on the page rather than just the title string itself.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: async-Option in FormComponentOptions

Die async-Option wird bei einer <Form>-Komponente nicht mehr verworfen, sondern in FormComponentOptions aufgenommen und an den zugrunde liegenden Visit weitergereicht.

Pull request by @sawirricardo

The async visit option was silently dropped when passed to a <Form> component, meaning options={{ async: true }} had no effect and forms always submitted synchronously. The option is now properly included in FormComponentOptions and passed through to the underlying visit.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: onSuccess-Callback von Form wird abgewartet

Gibt der onSuccess-Callback einer <Form> ein Promise zurück, wird dieses nun abgewartet, bevor der processing-Status zurückgesetzt wird.

Pull request by @mattwigham

If your <Form> component's onSuccess callback returned a Promise - say, polling a background job before reloading - the form's processing state would clear before that async work finished. This made disableWhileProcessing unreliable and any UI tied to processing behave unexpectedly. The fix is simple: the callback is now properly awaited before the form marks itself as done.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: Props im withApp-Callback

Der withApp-Callback erhält jetzt die initialen Page Props, wie es zuvor beim älteren setup-Callback möglich war.

Pull request by @CL0Pinette

The withApp callback now receives the initial page props, giving you access to data like the user's locale or other bootstrapped values at app setup time. This restores a capability that existed in the older setup callback before withApp was introduced.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Boost: Pint läuft standardmäßig mit --dirty

Die Pint-Integration von Boost verwendet standardmäßig --dirty, sodass nur geänderte Dateien formatiert werden, was zusammen mit --parallel die Formatierung deutlich beschleunigt.

Pull request by @calebdw

Boost's Pint integration now runs with --dirty by default, so only files that have actually changed get formatted. Combined with --parallel, formatting is significantly faster in agentic workflows where only a handful of files are touched per turn.

Originalquelle(öffnet in neuem Tab)Problem melden