News

Laravel 5.6.9 Released

Published
Laravel 5.6.9 Released image

Release updates

Never miss a Laravel release

Get an email whenever a new Laravel release lands.

Two new Laravel 5.6 releases are now available, Laravel v5.6.8 (tagged March 6th) and Laravel v5.6.9 (tagged yesterday).

Laravel 5.6.8 released a nice whereInstanceOf() method which you can use to filter out items in the collection that are an instance of a class. Here’s what it looks like from the test:

$c = new Collection([new stdClass, new stdClass, new Collection, new stdClass]);
$this->assertCount(3, $c->whereInstanceOf(stdClass::class));

I find this method a simple yet helpful addition to the already killer collection class. Nice work Taylor!

Next up, a dispatchNow() method is available with the Illuminate\Foundation\Bus\Dispatchable trait.

After many attempts to add a Blade @dump helper, Taylor Otwell finally caved:

The @dump helper works like @dd but doesn’t “die.”

Next up, a new MySQL sounds like operator is available, which can be used like so:

$query->where('name', 'sounds like', 'John Doe');

Note that the “sounds like” operator is specific to MySQL.

In Laravel 5.6.9 and Laravel 5.5.37, a potential XSS vector was patched in the default Bootstrap scaffolding that ships with laravel. Taylor Otwell mentioned it in his article JS Frameworks, Server Side Rendering, and XSS. You can patch your existing code that might be vulnerable to this issue by patching it with v-pre:

<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }} <span class="caret"></span>
</a>

Here are the full release notes for both v5.6.8 and v5.6.9:

v5.6.9 (2018-03-07)

Changed

  • Regenerate token when regenerating the session (20e8419)

Fixed

  • Fixed an issue with resources when loading a single merge value with an associative array (#23414)

v5.6.8 (2018-03-06)

Added

  • Added support for MySQL’s sounds-like operator (#23351)
  • Added ThrottleRequestsException exception (#23358)
  • Added @dump Blade directive (#23364)
  • Added Collection::whereInstanceOfMethod() (78b5b92)
  • Added Dispatchable::dispatchNow() (#23399)

Changed

  • Allow extension of DatabaseNotification model attributes (#23337)
  • Made auth scaffolding translatable (#23342)
  • Use getKeyName() in getForeignKey() (#23362)
  • Sort FileSystem files and directories by name (#23387)
  • Return validated data from Validator::validate() (#23397, 3657d66)

Fixed

  • Fixed serve command escaping (#23348)
  • Fixed an issue with multiple select statements in combination with withCount() (#23357)
  • Fixed conditional loading issues (#23369)
  • Prevent considering arrays as callable while building model factories (#23372)
  • Move tightenco/collect to Composer’s conflict (#23379)
  • Set up loop variable correctly on all Traversable objects (#23388, 49770ec)
  • Removed attribute filling from pivot model (#23401)
Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Laravel Auditor Audits Your App With Your Own AI Agent image

Laravel Auditor Audits Your App With Your Own AI Agent

Read article
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article