Zum Inhalt springen

Laravel Framework Updates & Release Notes

Einträge
234
Quellen
1
Zuletzt aktualisiert

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

Laravel Framework von Laravel

Laravel Framework 12.x: Ausführliche Ausgabe für queue:work

Mit php artisan queue:work --verbose werden jetzt Queue-Namen neben jedem Job und dessen Job-ID angezeigt, was das Debugging mit mehreren Queues erleichtert.

Pull requests by @seriquynh & @amirhshokri

php artisan queue:work --verbose
// App\Jobs\UrgentAction 85 high
// App\Jobs\NormalAction 84 default

With --verbose, you’ll now see queue names alongside each job and job ID, making multi-queue debugging straightforward and saving you time when tracing issues.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 12.x: Uri implementiert JsonSerializable

Ein Serialisierungsfehler wurde behoben, sodass eine Uri beim Serialisieren eines größeren JSON-Objekts korrekt in einen String umgewandelt wird.

Pull request by @devajmeireles

echo json_encode(new Uri('/path?x=1'));
// "http://localhost:8000/path?x=1"

This release fixes a serialization bug, properly converting the URI to a string when serializing a larger JSON object that contains the URI as a value.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 12.x: Neue Str-Methoden doesntStartWith() und doesntEndWith()

Die neuen Str-Methoden doesntStartWith() und doesntEndWith() bilden das Gegenstück zu startsWith/endsWith und prüfen fließend, womit ein String nicht beginnt oder endet.

Pull request by @balboacodes

str('apple')->doesntStartWith('b'); // true
str('apple')->doesntEndWith('e'); // false

The inverse of startsWith/endsWith, these new methods allow you to fluently test for starting and ending characters in your string.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Closure-Unterstützung in pluck()

Mit pluck() lassen sich Schlüssel und Werte jetzt über Callbacks dynamisch erzeugen, sodass kein separates Mapping vor dem Plucken mehr nötig ist.

Pull request by @ralphjsmit

$users->pluck(fn($u) => $u->email, fn($u) => strtoupper($u->name));

You can now dynamically generate keys and values via callbacks. Instead of mapping then plucking, you get a single, flexible method that reduces steps and keeps intent clear.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.x: Verbose-Ausgabe für queue:work

Mit --verbose zeigt queue:work nun Queue-Namen neben Job und Job-ID an, was das Debugging mit mehreren Queues erleichtert.

Pull requests by @seriquynh & @amirhshokri

php artisan queue:work --verbose
// App\Jobs\UrgentAction 85 high
// App\Jobs\NormalAction 84 default

With --verbose, you’ll now see queue names alongside each job and job ID, making multi-queue debugging straightforward and saving you time when tracing issues.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.x: Uri implementiert JsonSerializable

Ein Serialisierungsfehler wurde behoben, sodass ein Uri in einem größeren JSON-Objekt korrekt als String umgewandelt wird.

Pull request by @devajmeireles

echo json_encode(new Uri('/path?x=1'));
// "http://localhost:8000/path?x=1"

This release fixes a serialization bug, properly converting the URI to a string when serializing a larger JSON object that contains the URI as a value.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.x: Str::doesntStartWith und doesntEndWith

Die neuen Str-Methoden doesntStartWith() und doesntEndWith() sind das Gegenstück zu startsWith/endsWith.

Pull request by @balboacodes

str('apple')->doesntStartWith('b'); // true
str('apple')->doesntEndWith('e'); // false

The inverse of startsWith/endsWith, these new methods allow you to fluently test for starting and ending characters in your string.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

pluck() unterstützt Closures

Mit pluck() lassen sich Schlüssel und Werte jetzt dynamisch über Callbacks erzeugen, sodass kein separates Mapping vorab nötig ist.

Pull request by @ralphjsmit

$users->pluck(fn($u) => $u->email, fn($u) => strtoupper($u->name));

You can now dynamically generate keys and values via callbacks. Instead of mapping then plucking, you get a single, flexible method that reduces steps and keeps intent clear.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 12.x: encrypt() und decrypt() für Str

Die Methoden encrypt() und decrypt() lassen sich jetzt direkt an einer Str-Instanz verketten, sodass keine separaten Verschlüsselungsaufrufe nötig sind.

Pull request by @KIKOmanasijev

You can now chain encrypt() and decrypt() directly on a Str instance, so instead of piping your string through separate encryption calls, you can write:

$value = Str::of('secret')->encrypt()->prepend('Encrypted: ');
$original = Str::of($value)->decrypt();

This keeps your string-manipulation chains concise (no need to write separate, extra code to handle encryption) and you don’t have to manually wrap a value in encryption calls each time.

Learn more about encrypt and decrypt

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 12.x: broadcast_if() und broadcast_unless()

Mit den neuen Helfern broadcast_if() und broadcast_unless() lässt sich bedingtes Broadcasting in einem einzigen Aufruf statt in mehrzeiligen Bedingungen umsetzen.

Pull request by @taylorotwell

You now have two methods for conditional broadcasting in a single call:

broadcast_if($order->isPaid(), new OrderShipped($order));
broadcast_unless($user->isActive(), new InactiveUserAlert($user));

This replaces multi-line conditionals around broadcast() and makes your event logic more readable, improving the overall developer experience.

Read the docs about event broadcasting in Laravel

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel Framework 12.x: Flag --batched für make:job

php artisan make:job akzeptiert jetzt die Option --batched und erzeugt den Job direkt mit dem bereits eingebundenen Batchable-Trait.

Pull request by @hafezdivandari

The php artisan make:job command now accepts a --batched option:

php artisan make:job ProcessPodcast --batched

This command scaffolds the job with the Batchable trait already applied, so you don’t have to add it manually. It saves you a manual step and ensures consistency.

Learn more about defining batchable jobs

VS Code Performance Improvements

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.x: encrypt() und decrypt() für Str

Die String-Helfer encrypt() und decrypt() lassen sich jetzt direkt an einer Str-Instanz verketten.

Pull request by @KIKOmanasijev

You can now chain encrypt() and decrypt() directly on a Str instance, so instead of piping your string through separate encryption calls, you can write:

$value = Str::of('secret')->encrypt()->prepend('Encrypted: ');
$original = Str::of($value)->decrypt();

This keeps your string-manipulation chains concise (no need to write separate, extra code to handle encryption) and you don’t have to manually wrap a value in encryption calls each time.

Learn more about encrypt and decrypt

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 12.x: broadcast_if() und broadcast_unless() hinzugefügt

Mit den neuen Hilfsfunktionen broadcast_if() und broadcast_unless() lässt sich bedingtes Broadcasting in einem einzigen Aufruf statt mit mehrzeiligen Bedingungen um broadcast() herum umsetzen.

Pull request by @taylorotwell

You now have two methods for conditional broadcasting in a single call:

broadcast_if($order->isPaid(), new OrderShipped($order));
broadcast_unless($user->isActive(), new InactiveUserAlert($user));

This replaces multi-line conditionals around broadcast() and makes your event logic more readable, improving the overall developer experience.

Read the docs about event broadcasting in Laravel

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

make:job unterstützt jetzt die Option --batched

Der Befehl php artisan make:job akzeptiert nun die Option --batched und erzeugt den Job direkt mit dem bereits eingebundenen Batchable-Trait.

Pull request by @hafezdivandari

The php artisan make:job command now accepts a --batched option:

php artisan make:job ProcessPodcast --batched

This command scaffolds the job with the Batchable trait already applied, so you don’t have to add it manually. It saves you a manual step and ensures consistency.

Learn more about defining batchable jobs

VS Code Performance Improvements

Originalquelle(öffnet in neuem Tab)Problem melden