v12.70.1
- [12.x] Prevent escaping from bypassing protection by @valorin in https://github.com/laravel/framework/pull/62027
Folge Laravel Framework, um die Release Notes in deinen Feed zu holen.
where rule by @sertxudev in https://github.com/laravel/framework/pull/62059until higher order collection proxy by @xurshudyan in https://github.com/laravel/framework/pull/62057mode() returning truncated values for floats by @xurshudyan in https://github.com/laravel/framework/pull/62063NotificationFailed flag before each channel send by @xurshudyan in https://github.com/laravel/framework/pull/62074#[Connection] attribute over inherited $connection property by @xurshudyan in https://github.com/laravel/framework/pull/62065 …onOneServer() and withoutOverlapping() by @tanerkay in https://github.com/laravel/framework/pull/62007has() and withCount() on self-referencing one-of-many relations by @sumaiazaman in https://github.com/laravel/framework/pull/62009whereBelongsTo() and whereAttachedTo() collection types by @xurshudyan in https://github.com/laravel/framework/pull/62002--queue option in queue:failed by @jackbayliss in https://github.com/laravel/framework/pull/61971cursor() by @xurshudyan in https://github.com/laravel/framework/pull/62001In dieser Version wurden unterstützte Exit-Codes für Worker-Timeout hinzugefügt, benannte S3-Anbieter und Cloud-IAM-Disks unterstützt, sowie die Warteschlangen-Konfiguration um einen Hintergrund-Connector erweitert.
$echoFormat by @crynobone in https://github.com/laravel/framework/pull/61822DeleteWhenMissingModels and FailOnTimeout on queued mailables by @xurshudyan in https://github.com/laravel/framework/pull/61899Diese Version behebt Abfrageprobleme, überträgt den EncodedParameter und generiert unterschiedliche Cache-Dateien basierend auf der konfigurierten Echo-Formatierung.
$echoFormat by @crynobone in https://github.com/laravel/framework/pull/61822Laravel Framework v13.35.0 erlaubt Arrays von Eigenschaften in Fake-Assertions, unterstützt Prozentwerte für queue:work --memory, ergänzt markdown() in der Response-Factory, Schedule::alwaysOnOneServer(), onOneServer in der schedule:list-JSON-Ausgabe sowie die Option lazy_root_creation für local-Disks.
onOneServer to the schedule:list --json output by @MizouziE in https://github.com/laravel/framework/pull/61798lazy_root_creation configuration option for local disks by @ziadoz in https://github.com/laravel/framework/pull/61799MariaDB-Vektorabfragen wie whereVectorSimilarTo() und orderByVectorDistance() funktionieren dank vec_fromtext() ohne SQL-Fehler, und der neue Eloquent-Cast AsVector liest und schreibt Vektoren als Float-Arrays.
Pull request by @eas4ai
MariaDB vector distance queries now convert bound vectors with vec_fromtext(), fixing SQL errors when using methods such as whereVectorSimilarTo() and orderByVectorDistance(). The new AsVector Eloquent cast reads MariaDB's binary vectors or PostgreSQL-compatible text vectors as arrays of floats and accepts arrays or Arrayable values when writing them.
use Illuminate\Database\Eloquent\Casts\AsVector;
use Illuminate\Database\Eloquent\Model;
class Document extends Model
{
protected $casts = [
'embedding' => AsVector::class,
];
}
Filesystem-Disks bieten neue Methoden copyToDisk() und moveToDisk(), um Dateien optional unter neuem Pfad auf eine andere Disk zu kopieren oder zu verschieben.
Pull request by @jackbayliss
Filesystem disks now expose copyToDisk() and moveToDisk() for transferring files to another configured disk, optionally under a new path. Both methods stream the file and close the stream; moveToDisk() deletes the source only after the copy succeeds.
use Illuminate\Support\Facades\Storage;
Storage::disk('local')->copyToDisk('s3', 'reports/report.csv', 'archive/report.csv');
Storage::disk('local')->moveToDisk('backup', 'reports/report.csv');
Mit DevCommands::withoutVendorCommands() und DevCommands::withoutDefaultCommands() lassen sich Vendor- oder Standardbefehle aus php artisan dev ausschließen.
Pull request by @jackbayliss
Applications can now exclude vendor-provided or framework-default development commands from php artisan dev with DevCommands::withoutVendorCommands() and DevCommands::withoutDefaultCommands(). This lets projects keep their own development commands without maintaining a list of every vendor and default command name.
Die neue Methode chunkBy() teilt Collections und Lazy Collections immer dann, wenn sich ein gewählter Wert ändert, und gruppiert damit nur aufeinanderfolgende Treffer.
Pull request by @JosephSilber
The new chunkBy() method splits collections and lazy collections whenever a chosen value changes. Unlike groupBy(), it groups only consecutive matches: values with the same key that appear later form a separate chunk. Pass a property name or callback to choose the value to compare.
collect([1, 1, 2, 2, 1])->chunkBy(fn ($value) => $value);
// [[1, 1], [2, 2], [1]]
Die Mail- und Notification-Fakes bieten neue Assertions wie Mail::assertSentOnce() und Notification::assertSentToOnce() für Ereignisse, die genau einmal auftreten sollen.
Pull request by @talaridisTh
The mail and notification fakes now offer assertions for events that should happen exactly once: Mail::assertSentOnce(), Mail::assertQueuedOnce(), Notification::assertSentToOnce(), and Notification::assertSentOnDemandOnce(). These are shorter alternatives to the corresponding ...Times(..., 1) assertions.
AsCollection::nullable() und AsArrayObject::nullable() speichern bei null ein natives SQL NULL, während bestehende Casts weiterhin den JSON-Wert "null" speichern.
Pull request by @zeinrahmad76
AsCollection::nullable() and AsArrayObject::nullable() now opt in to storing a native SQL NULL when an attribute is set to null, so queries such as whereNull() can match it. Existing casts keep their previous behavior of storing the JSON "null" value unless the nullable variant is selected.
use Illuminate\Database\Eloquent\Casts\AsCollection;
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
protected $casts = [
'items' => AsCollection::nullable(),
];
}
MySQL-Migrationen können Index- und Foreign-Key-Definitionen mit inplace() verketten, um ALGORITHM=INPLACE explizit anzufordern.
Pull request by @SanderMuller
MySQL schema migrations can now chain inplace() onto index and foreign key definitions to request ALGORITHM=INPLACE. Combined with the existing lock('none') option, this lets a migration explicitly request a less disruptive DDL operation instead of silently accepting a different algorithm; MySQL can reject operations it cannot perform under those constraints.
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('video_sessions', function (Blueprint $table) {
$table->index('video_id')->inplace()->lock('none');
});
Jobs können sich per #[CountCrashesAsExceptions] oder $countCrashesAsExceptions dafür entscheiden, dass unerwartet beendete Worker-Versuche auf maxExceptions angerechnet werden.
Pull request by @williamjulianvicary
Jobs can opt in to counting an unexpectedly terminated worker attempt toward maxExceptions using the #[CountCrashesAsExceptions] attribute or $countCrashesAsExceptions property. This helps prevent jobs from retrying indefinitely after crashes or external worker kills; normal completions and worker-managed timeouts do not count as crashes. The feature uses a cache marker for opted-in jobs.
Laravel Framework v13.34.0 nimmt die Dauer ins JobProcessed-Event auf, benachrichtigt Jobs vor einem Timeout, ergänzt die Option --queue für queue:flush und behebt mehrere Fehler, etwa bei Number::parseInt(), PhpRedisLock::refresh() und Collection::mode().
Number::parseInt() returning false for values above 32-bit range by @sumaiazaman in https://github.com/laravel/framework/pull/61691PhpRedisLock::refresh() when phpredis serialization is enabled by @sumaiazaman in https://github.com/laravel/framework/pull/61690Laravel Framework v12.69.3 macht den Exit-Code bei Worker-Timeout erreichbar und unterstützt benannte S3-Credential-Provider sowie Cloud-IAM-Disks.
Laravel Framework v13.33.0 ermöglicht das Abschalten des Worker-Kills bei Job-Timeout, passt die Speicherung des Passwort-Hashs für authentifizierte Sessions an, unterstützt brick/math 0.20 und 1.0 und behebt mehrere Fehler bei Cache- und Eloquent-Collections.
Laravel Framework v13.32.0 erlaubt Enums in den Queue-Methoden pause/resume, übergibt die Exception an Eloquent-Violation-Callbacks und behebt Fehler bei hasIndex, containsStrict() und Factory::raw() mit Anzahl null.
withFreshQueryLog() by @SanderMuller in https://github.com/laravel/framework/pull/61458askWithCompletion() by @SanderMuller in https://github.com/laravel/framework/pull/61487SessionHandlerInterface for PHP 9 by @crynobone in https://github.com/laravel/framework/pull/61517 …Laravel Framework v13.31.0 prüft vor der Authentifizierung, ob der Passwort-Hash zum gespeicherten Cookie passt, ergänzt Queue::totalSize, das JobInterrupted-Event und Chaperone-Unterstützung für BelongsToMany-Pivot-Modelle und behebt Fehler bei lazy()/lazyById() sowie userFromRecaller().
JobInterrupted event by @jackbayliss in https://github.com/laravel/framework/pull/61412bulk() node-less MULTI; allQueueNames() uses KEYS) by @Orrison in https://github.com/laravel/framework/pull/61198Laravel Framework v12.69.2 setzt einen Standardwert für memoryExceededExitCode in Cloud und korrigiert die Rückgabetypen bei withFreshQueryLog() und askWithCompletion().
withFreshQueryLog() by @SanderMuller in https://github.com/laravel/framework/pull/61458askWithCompletion() by @SanderMuller in https://github.com/laravel/framework/pull/61487