Thursday, September 14, 2023
HomePHPLaravel 10.22 Launched|Laravel Information

Laravel 10.22 Launched|Laravel Information

Today, the Laravel group launched v10.21.1 and also v10.22 with ULID screening assistants, precognition screening assistants, Enum assistance in Policy:: in() and also Policy:: notIn() recognition regulations, and also extra:

ULID screening assistants

Jason Jones added screening assistants for the generation of ULIDs to match screening assistants produced for UUIDs:

$ ulid = Str:: ulid();

Str:: createUlidsUsing( fn() => > $ulid);

Str:: ulid() == = $ulid; // real

// Freeze ULID generation after that bring back generation

$ ulid = Str:: freezeUlids();

Str:: ulid() == = Str:: ulid() == = $ulid; // real

Str:: createUlidsNormally();

// Freeze throughout of the closure

Str:: freezeUlids( feature ($ ulid) {

Str:: ulid() == = Str:: ulid() == = $ulid; // real

} );

Str:: ulid() == = Str:: ulid(); // incorrect

// Series of ULIDs

Str:: createUlidsUsingSequence([

$zeroth = Str::ulid(),

$first = Str::ulid(),


Str:: ulid() == = $zeroth;

Str:: ulid() == = $very first;

Str:: ulid(); // back to generally created ULIDs.

I really did not provide the whole API readily available; you can look into Pull Demand # 48276 for even more information.

Precognition screening assistants

Peter Fox added screening assistants for Laravel Precognition

$ this->> withPrecognition()

->> obtain('/')

->> assertSuccessfulPrecognition();

Enum assistance for in and also notIn recognition regulations

Tim Geisendoerfer added enum assistance for the Policy:: in() and also Policy:: notIn() recognition regulations:

enum Shade: string


instance RED = ' red';

instance ECO-FRIENDLY = ' environment-friendly';

instance BLUE = ' blue';


// Make use of the Shade enum with Policy:: in()

Validator:: verify(



'color'=> [

Rule::in([Color::RED, Color::GREEN])




Launch notes

You can see the total listing of brand-new functions and also updates listed below and also the diff in between 10.21.0 and also 10.22.0 on GitHub. The adhering to launch notes are straight from the changelog:

  • [10.x] Include ulid screening assistants by @Jasonej in
  • [10.x] Repair concern with table prefix replication in DatabaseTruncation attribute by @mobidev86 in
  • [10.x] Took care of a typo in phpdoc block by @back2Lobby in
  • [10.x] HotFix: toss caught UniqueConstraintViolationException if there are no matching documents on SELECT retry by @mpyw in
  • [10.x] Includes screening assistants for Precognition by @peterfox in
  • [10.x] GeneratorCommand – Arranging feasible designs and also occasions by @TWithers in
  • [10.x] Include Enum Assistance to the In and also NotIn Recognition Guidelines by @geisi in
  • PHP 8.3 Assistance by @driesvints in
  • [10.x] Phone Call renderForAssertions in all Mailable assertions by @jamsch in
  • [10.x] Introduce requireEnv assistant by @lucasmichot in
  • [10.x] Incorporate prefix with table for compileDropPrimary PostgreSQL by @dyriavin in
  • [10.x] BelongsToMany Docblock Improvements by @crynobone in

Most Popular

Recent Comments