Laravel 5.6.9 Released

Published on by

Laravel 5.6.9 Released image

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.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes.

Visit Larafast: Laravel SaaS Starter Kit
Laravel Forge logo

Laravel Forge

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

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
All Green logo

All Green

All Green is a SaaS test runner that can execute your whole Laravel test suite in mere seconds so that you don't get blocked – you get feedback almost instantly and you can deploy to production very quickly.

All Green
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with VILT and TALL stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Asserting Exceptions in Laravel Tests image

Asserting Exceptions in Laravel Tests

Read article
Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4 image

Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4

Read article
Basset is an alternative way to load CSS & JS assets image

Basset is an alternative way to load CSS & JS assets

Read article
Integrate Laravel with Stripe Connect Using This Package image

Integrate Laravel with Stripe Connect Using This Package

Read article
The Random package generates cryptographically secure random values image

The Random package generates cryptographically secure random values

Read article
Automatic Blade Formatting on Save in PhpStorm image

Automatic Blade Formatting on Save in PhpStorm

Read article