Home  >  Article  >  PHP Framework  >  Laravel 8.17 is released!

Laravel 8.17 is released!

藏色散人
藏色散人forward
2020-12-30 08:56:311948browse

The following is an introduction to Laravel 8.17 is released! 8.17 from the Laravel 8.17 is released! Framework tutorial column, I hope it will be helpful to friends in need!

Laravel 8.17 is released!

Yesterday the Laravel 8.17 is released! team released version 8.17, which introduced transaction-aware code execution, added new dump() and dd() methods to the request object, and 8.x Latest changes to the branch:

Execute code with transaction awareness

Mohamed Said contributed a transaction manager class for recording transactions, commits and rollbacks. This feature includes a transaction-aware handler that executes code after (and only after the transaction commits)

DB::afterCommit(function () {
    // 仅在提交事务后执行。
    // 如果事务回滚则丢弃。
    Mail::send(...);
});

The transaction-aware manager is for subsequent listeners, jobs, mail, etc. by default The foundation is laid for using aware transactions.

Add dump() and dd() methods to the Request object

Trajche Nakov contributed dump() and dd() to the Illuminate Request class Method:

$request->dd();

// 只打印数组中的key
$request->dd(['name', 'age']);

// 将它们作为单独的参数传递
$request->dd('name', 'age');

// 在运行验证之前快速检查请求参数
$request->dd()->validate([
    'name' => 'required'
]);

Release Notes

You can see the full list of new features and updates and the differences between 8.16.0 and 8.17.0 on GitHub. The following release notes are from the changelog:

v8.17.0

New

  • New: Transaction execution aware code (#35373, 9565598)
  • Request object adds dd() and dump() (#35384, c43e08f)
  • Use the enqueueUsing method to queue all jobs (#35415, 010d4d7, #35437)

Repair

  • Fix the problem of polymorphic morphMaps with text 0 (#35364)
  • Fix the self-association problem in the withAggregate method (#35392, aec5cca, #35394)
  • Fixed using PHP_EOL instead of \ n in PendingCommand (#35409)
  • Fixed image validation issue in image/jpeg format after Symfony/Mime update (#35419)
  • Fixed the problem of being unable to customize projection to objects (#35420)
  • Fixed Illuminate\Collections\Collection::sortBy() (307f6fb)
  • Use When specifying a time in doubleiMonthly(), do not use minute and hour overrides (#35436)

Change items

  • Make DownCommand available for rendering views after restart (#35357, b1ee97e)
  • Set the default value for the cloud driver (0bb7fe4)
  • Update Tailwind paging focus style (#35365)
  • Redis: Allow passing connection name (#35402)
  • Modify Wormhole to use Date Factory (#35421)

Original address: https://laravel-news.com/laravel-8-17-0

Translation address: https://learnku.com/laravel/t/53055

The above is the detailed content of Laravel 8.17 is released!. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete