Laravel 5.6.6 Released

News

February 28th, 2018

laravel-5.6.6.png

Laravel 5.6.6 is now available for general release, including two new collection methods sortKeys and sortKeysDesc, some changes that improve upon existing functionality, and the latest fixes.

The two new convenience collection methods allow you to sort object keys and sort them in descending order.

The PR adding these key sorting methods provides the following usage example:

1$this->renderLead(collect($this->getLeadViaAPI($id))->sortKeys());

Instead of having to do something like the following to sort keys:

1$leadData = get_object_vars($this->getLeadViaAPI($id));
2ksort($leadData);
3
4$this->renderLead(collect($leadData));

Next up, is a change to the optional() helper, which now returns null if an object property is undefined as you might expect:

1$data = (object) ['foo' => 'bar'];
2
3optional($data)->foobar // null

A performance change was made to cache wildcard listeners, which can potentially have a performance improvement for high-volume and data-heavy APIs.

Another change was updating the database schema for morphs() and nullableMorphs() to use unsignedBigInteger instead of unsignedInteger .

Here are the full release notes from the Laravel 5.6 GitHub changelog:

v5.6.6 (2018-02-27)

Added

  • Added sortKeys() and sortKeysDesc() methods to Collection (#23286)

Changed

  • Return null from optional() helper if object property is undefined (#23267)
  • Cache event wildcard listeners (#23299, 82099cb)
  • Changed morphs() and nullableMorphs() to use unsignedBigInteger() (#23320)

Fixed

  • Prevent delayed jobs in v5.5 fail to run in v5.6 (#23287)
  • Queue::bulk() fake now properly pushes expected jobs (#23294)
  • Fixed the list of packages removed when the “none” preset is installed (#23305)
  • Fixed an issue with orHaving() arguments (e7f13be)

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.