Zum Inhalt springen

Laravel Release Notes

176 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

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

useSocketId()-Hook für React, Vue und Svelte (Echo)

Die drei Echo-Adapter für React, Vue und Svelte liefern einen reaktiven Hook useSocketId(), der die aktuelle Socket-ID bereitstellt und sich bei erneuter Verbindung automatisch aktualisiert.

Pull request by @hectorgrecco

All three Echo framework adapters now ship a useSocketId() reactive hook that gives you the current socket ID and automatically updates when the connection reconnects with a new one. Pass it in an X-Socket-Id header to prevent your own broadcast events from being received back.

// React
import { useSocketId } from "@laravel/echo-react";
const socketId = useSocketId();

// Vue
import { useSocketId } from "@laravel/echo-vue";
const socketId = useSocketId(); // ComputedRef<string | undefined>

// Svelte
import { useSocketId } from "@laravel/echo-svelte";
const socketId = useSocketId(); // getter function

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Sail: Build-Argument PHP_EXTENSIONS für zusätzliche PHP-Extensions

Über das Build-Argument PHP_EXTENSIONS in docker-compose.yml lassen sich zusätzliche PHP-Extensions in Sail installieren, ohne das Dockerfile zu veröffentlichen und zu bearbeiten.

Pull request by @sydgren

Installing extra PHP extensions in Sail no longer requires publishing and hand-editing the Dockerfile. Pass a PHP_EXTENSIONS build argument in docker-compose.yml with a space-separated list of extensions, and Sail's Dockerfile will install them at build time.

services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.4
            dockerfile: Dockerfile
            args:
                WWWGROUP: "${WWWGROUP}"
                PHP_EXTENSIONS: "gmp imagick"

Existing builds are unaffected - the argument defaults to empty.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Neuer Cache-Store storage

Das Cache-System unterstützt jetzt einen dateisystembasierten storage-Treiber, mit dem sich ein vorhandener Disk wie S3 als Key/Value-Cache nutzen lässt.

Pull request by @taylorotwell

Laravel's cache system now supports a storage driver backed by the filesystem, making it straightforward to use an existing disk - like S3 - as a key/value cache without any additional infrastructure.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Password::toPasswordRulesString() für passwordrules-Attribut

Die neue Methode toPasswordRulesString() der Password-Regel wandelt Validierungsregeln in einen passwordrules-String um, damit Passwortmanager wie 1Password und Safari konforme Passwörter erzeugen können.

Pull request by @imliam

Password managers like 1Password and Safari can read the passwordrules HTML attribute to generate passwords that satisfy your app's policy - no more rejected passwords and frustrated users at registration. The new toPasswordRulesString() method on the Password rule converts your validation constraints into the right format automatically.

<input
    type="password"
    autocomplete="new-password"
    passwordrules="{{ Password::defaults()->toPasswordRulesString() }}"
/>

The method maps directly from your existing validation rules:

Password::min(12)->max(64)->mixedCase()->numbers()->symbols()->toPasswordRulesString()
// 'minlength: 12; maxlength: 64; required: lower; required: upper; required: digit; required: special;'

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Environment-Filter für den Befehl schedule:list

Mit dem neuen Flag --environment zeigt schedule:list nur noch 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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Neuer Schema-Helper foreignUuidFor

Der neue Migrations-Helper foreignUuidFor leitet Spaltenname, verknüpfte Tabelle und Primärschlüssel aus dem Model ab und ist für UUID-basierte Beziehungen gedacht.

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

cache:clear unterstützt jetzt prohibit()

Der Befehl cache:clear lässt sich nun wie db:fresh und migrate:fresh mit prohibit() sperren, etwa in gehosteten 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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

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

Ein optionaler Parameter normalize: true wandelt komplett großgeschriebene Wortsegmente vor der Konvertierung in Kleinbuchstaben um, sodass etwa 'CBOR' zu '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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

nunomaduro/pao standardmäßig im Laravel-Skeleton

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

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: mode-Option 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