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 12.64.0: Enums als Overlap-Key für Queue-Jobs

Laravel Framework 12.64.0 erlaubt Enums als Overlap-Key für Queue-Jobs und fügt Stringable::initials() einen capitalize-Parameter hinzu.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.19.0: reduceInto, counted und Queue-Fake-Prüfung

Laravel Framework 13.19.0 ergänzt die Collection-Methode reduceInto sowie counted für Str und Stringable, ermöglicht das Prüfen reservierter Jobs in der Queue-Fake, übergibt deletedAtColumn an die Soft-Delete-Assertions und holt Managed-Queue-Jobs vom cloud-agent statt von SQS.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.63.0: Cache-Locks erneuern und Postgres-Absturz behoben

Laravel Framework 12.63.0 ermöglicht das Erneuern von Cache-Locks, erkennt weitere Fehlermeldungen für verlorene Verbindungen, schützt den JsonSchema-Deserializer vor unbegrenzter $ref-Expansion und behebt einen Postgres-Absturz bei whereDate/whereTime mit Expression-Spalten.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 13.18.1

Version 13.18.1 bringt unter anderem input() für Konsolenbefehle, die Release-Queue-Middleware, Unterstützung für iterable bei assertDatabaseEmpty sowie mehrere Korrekturen, etwa zu On-Demand-Log-Stacks, Str::mask() und Predis-Retry-Konfiguration.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Metadaten für Routen

Routen können mit der neuen Methode ->metadata() beliebige, route-cache-kompatible Metadaten tragen, wobei Gruppen-Metadaten rekursiv in untergeordnete Routen gemergt werden.

Pull request by @benbjurstrom

Routes can now carry arbitrary metadata through the full routing pipeline. Whether you're tagging routes for SEO, feature flags, or permissions, the new ->metadata() method gives you a dedicated, structured place to store that data - and it's fully compatible with route caching. Metadata set on a group merges recursively into child routes, so you can set defaults up top and override them where needed.

Route::metadata(['head' => ['robots' => ['noindex'], 'author' => 'Taylor']])
    ->group(function () {
        Route::get('/users', [UserController::class, 'index'])
            ->metadata(['head' => ['title' => 'Users']]);
    });

// Inside a controller or middleware
$request->route()->getMetadata('head.title');          // 'Users'
$request->route()->getMetadata('head.author', 'Taylor'); // 'Taylor'

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Postgres-Transaction-Pooler

Laravel unterstützt Postgres hinter Transaction-Mode-Poolern wie PgBouncer, AWS RDS Proxy oder Neon über die Option pooled => true, und ::direct am Verbindungsnamen umgeht den Pooler für DDL-Operationen.

Pull request by @DGarbs51

Running Postgres behind a transaction-mode connection pooler like PgBouncer, AWS RDS Proxy, or Neon? Laravel now supports this at the framework level. Set pooled => true in your database connection config and the framework handles emulated prepares, proper boolean binding, and everything else the pooler requires. For schema and DDL operations that need a direct connection, append ::direct to the connection name and Laravel will route around the pooler automatically - no extra configuration needed.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Exceptions ohne Retry

Exceptions können über eine retry()-Methode, die false zurückgibt, oder über withExceptions() in bootstrap/app.php als nicht wiederholbar markiert werden, sodass sie keine Job-Versuche verbrauchen.

Pull request by @alexbowers

Some exceptions simply shouldn't trigger a retry - think invalid input, permanent external failures, or anything where retrying will just eat up your queue attempts with the same result. You can now define a retry() method directly on an exception class returning false, or configure non-retryable exceptions in bootstrap/app.php via withExceptions(). Either way, Laravel will respect the decision and move on without burning through your job's retry budget.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Flag --without-migration-data

schema:dump akzeptiert das neue Flag --without-migration-data, das Zeilen der Migrationstabelle aus dem Dump weglässt und so einen rein strukturellen Dump erzeugt.

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

Laravel Framework von Laravel

Laravel 13.x: between()/unlessBetween() unabhängig von timezone()-Reihenfolge

Die Zeitintervallprüfung von between() und unlessBetween() wird erst bei Ausführung des Filters ausgewertet, sodass die angegebene Zeitzone unabhängig von der Aufrufreihenfolge mit timezone() berücksichtigt wird statt stillschweigend UTC zu verwenden.

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

Laravel Framework von Laravel

Laravel 13.x: Neuer Befehl artisan dev

php artisan dev startet Server, Queue Worker, Log-Tailing und Vite gleichzeitig mit farblich getrennter Ausgabe, ersetzt das composer dev-Skript, erkennt den Node-Paketmanager automatisch und erlaubt über Service Provider zusätzliche Befehle.

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

Laravel Framework von Laravel

Laravel 13.x: array-Treiber für Wartungsmodus bei Parallel Testing

Ein neuer In-Memory-Treiber array hält den Wartungsmodus pro Prozess isoliert und vermeidet so Race Conditions und instabile Tests bei parallelen Testläufen mit dem dateibasierten Treiber.

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

Laravel Framework von Laravel

Laravel 13.x: 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 dabei direkt 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

Laravel Framework von Laravel

Laravel 13.x: anyOf-Unterstützung in JSON Schema

Illuminate\JsonSchema unterstützt jetzt anyOf, was ausdrucksstärkere Schemas für strukturierte KI-Ausgaben mit OpenAI und Gemini ermöglicht.

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

Laravel Framework von Laravel

Laravel 13.x: Queue-Attribute auf Traits unterstützt

PHP-Attribute wie #[Queue(...)] können nun auf Traits definiert werden und werden von Laravel berücksichtigt, wenn der Trait in einer Job- oder Event-Klasse verwendet wird.

Pull request by @jackbayliss

PHP attributes like #[Queue(...)] can now be defined on traits, and Laravel will respect them when the trait is used in a job or event class. If you have queue configuration that should be shared across multiple jobs - the same connection, queue name, or timeout - define it once in a trait instead of duplicating it across every class.

#[Queue(connection: 'redis', queue: 'broadcasting')]
trait BroadcastsImports
{
    public function broadcastWhen(): bool { /* ... */ }
}

class ImportCreated implements ShouldBroadcast
{
    use BroadcastsImports; // picks up the Queue attribute
}

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Neue Methode Bus::bulk()

Bus::bulk() gruppiert Jobs nach Queue und Connection und führt pro Gruppe einen einzigen Bulk-Insert aus, was das Einreihen vieler Jobs effizienter macht als einzelnes Dispatchen oder Batches.

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

Laravel Framework von Laravel

Laravel 13.x: Vector-Index-Unterstützung für MariaDB

Neben PostgreSQL unterstützt nun auch MariaDB das Anlegen von Vector-Indizes über den Schema Builder direkt in Migrationen.

Pull request by @michielvaneerd

MariaDB joins PostgreSQL in supporting vector index creation through Laravel's schema builder. If you're building semantic search or AI-powered retrieval features on a MariaDB database, you can now define vector indexes directly in your migrations without dropping down to raw SQL.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: 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 bereits möglich ist.

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

Laravel Framework von Laravel

Laravel 13.x: Multi-Type-Unions in Illuminate\JsonSchema

Illuminate\JsonSchema kann nun Schemas mit einem Array als type (z. B. ['string', 'number', 'boolean']) abbilden, die zuvor eine Exception auslösten, und bietet dafür auch JsonSchema::union().

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

Laravel Framework von Laravel

Laravel 13.x: Cache::rememberWithState()

Cache::rememberWithState() gibt neben dem gecachten Wert auch einen Boolean zurück, der anzeigt, ob es ein Cache-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

Laravel Framework von Laravel

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

Mit normalize: true werden komplett großgeschriebene Wortsegmente vor der Umwandlung kleingeschrieben, sodass Strings wie CBOR zu Cbor werden, während gemischt geschriebene Strings unverändert bleiben.

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