Array Collapse Performance Improvement in Laravel 5.8.20

Array Collapse Performance Improvement in Laravel 5.8.20

The Laravel team released v5.8.20 yesterday with a performance improvement to the Arr::collapse() method along with the latest weekly additions, changes, and fixes.

Performance Improvements

Last week we saw an improvement to the Arr::flatten() method in v5.8.19, and this week the Arr class gets another performance improvement to the collapse method.

As far as I understand the code, gist of the change is that now array_merge is called once instead of n times based on the size of the array. Check out Pull Request #28662 for details on the change and a follow-up Pull Request #28676 that removes the redundant additional empty array introduced in the first PR.

New Features

The viewAny method was added to the policy class stub used with the index action of a controller resource.

Next, the --fullpath option was added to the make:migration command that will output the full file path of the file. Outputting the full file path to the console is useful in terminals that enable you to open file paths in an editor.

You can see the full list of fixes below, and the whole diff between 5.8.19 and 5.8.20 on GitHub. The full release notes for Laravel 5.8 are available in the GitHub 5.8 changelog:

v5.8.20

Added

  • Added viewAny() to dummy policy class (#28654, #28671)
  • Added fullpath option to make:migration command (#28669)

Performance improvement

Fixed

  • Fixed artisan cache:clear command with a redis cluster using the Predis library (#28706)


Filed in: News


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Laravel Developer
San Jose, CA
X3 Builders
Lead Front End Developer
Remote
continued
Full-Stack Laravel Developer
Cologne
Revive Interior
Intermediate PHP Developer (Full Stack | CakePHP | Laravel | Vue | jQuery)
Remote
continued
Senior PHP Developer (Full Stack | CakePHP | Laravel | Vue | jQuery)
Remote
continued
Laravel Developer
Amsterdam (partially remote possible)
Let's Book
Web Developer (Laravel)
Tweed Heads, New South Wales, AUSTRALIA
Tursa Employment & Training