Laravel 10.7 Released

Home Blog Laravel 10.7 Released

Laravel 10.7 Released

Laravel 10.7 Released

Laravel 10.7 PHP has been presented to the general public - Laravel framework has created a new version 10.7. It contains improvements and new functionality introduced by Laravel programmers to the Laravel world.

The bright and prominent element is the pipe() method at the process level. It activates commands sequentially, and passes the analytics from the previously executed command to the start of the next one. The setValue() method in the Validator class is also an important feature. It makes it possible to define the value of this element. The package includes fixes for various issues and bugs. They were previously reported by the Laravel community.

Let's dwell on the functionality and changes in Laravel 10.7. In the Process layer we added the pipe() method. It ensures that commands are run sequentially and passes the analytics from a previously executed command to activate a subsequent command. This method will run commands sequentially and pass the output of the previous command to the input of the next command:

$pipe = Process::pipe(function ($pipe)
$pipe->command('cat test.txt'),

$pipe->command('grep -i "foo"'),
} );
$pipe->run()->output(); // "foo"

This function is useful when it is necessary to bundle the results of a group of teams.

Validator's setValue() method

Joel Harkes presented the setValue() method in the Validator class to determine the value of this attribute. The PR developer gave this rationale for the relevance of this technique:

To do package programming, I would like to be able to override the data, to ensure the security of the type check. After making edits there is no way to effectively override an already implemented value. I could call setData(), but this action would provide a complete reboot of the normals themselves, and would cause them to slow down dramatically.

// with this PR:
$this->validator->setValue($attribute, $value);

// previously: very slow!
Arr::set($this->data, $attribute, $value);
$this->validator->setData($this->data);

Control of recalled event listeners in testing

Luke Kuzmisz has made his own contribution to being able to approve summoned event listeners. Previously, this had not been possible:

Event::assertListening(
StationAssistanceRequested::class,
CreateDemandWorkOrder::class, // has __invoke() method
);

These are the updates made to Laravel web development. If you need quality services to create an effective, modern, advanced online shop leave your requests. Laravel web development from Devnrise team allows you to solve business problems on the web. We create large portals, develop and promote them.

Let's build an amazing project

Please fill in this short form and we will be in touch with you soon
FOR ANY QUESTIONS
sales@devnrise.com
VISIT US
Head Ofice in Latvia: Brivibas Street 137B, Riga, Latvia
United Kingdom: Office 2801, 182-184 High Street North, East Ham, London E6 2JA
whatsapp