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.

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

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

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
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant 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
Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate logo

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate

Build your SaaS application in hours. Out-of-the-box multi-tenancy and seamless Stripe integration. Supports subscriptions and one-time purchases, allowing you to focus on building and creating without repetitive setup tasks.

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate
Rector logo

Rector

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

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Asymmetric Property Visibility in PHP 8.4 image

Asymmetric Property Visibility in PHP 8.4

Read article
Access Laravel Pulse Data as a JSON API image

Access Laravel Pulse Data as a JSON API

Read article
Laravel Forge adds Statamic Integration image

Laravel Forge adds Statamic Integration

Read article
Transform Data into Type-safe DTOs with this PHP Package image

Transform Data into Type-safe DTOs with this PHP Package

Read article
PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell image

PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell

Read article
Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3 image

Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3

Read article