Laravel v6.10 Is Here

Published on by

Laravel v6.10 Is Here image

The Laravel team released v6.10 yesterday with eleven new features and a significant amount of fixes, deprecations, and optimizations. This release also starts to introduce framework support for PHPUnit v9 (v9 is due out February 2020).

Laravel Mix Test Helpers

Jason McCreary contributed withoutMix() and withMix() test helpers which are similar to enabling/disabling exception handling:

// Before
$this->swap(\Illuminate\Foundation\Mix::class, function () {
return '';
});
 
// After
$this->withoutMix();

Validate With Bag Request Macro

Paul-Henri Leobon contributed a Request macro validateWithBag which allows specifying the error bag when validating a request:

$request->validateWithBag('blog', [
'title' => ['required', 'unique:posts', 'max:255'],
'body' => ['required'],
]);

The documentation now reflects this new macro, check it out in the Validation documentation.

PHPUnit 9 Support

Graham Campbell contributed the start of PHPUnit 9 support in v6.x, which gets slightly nuanced; check out the pull request for the implementation details. To summarize the reasoning for starting to bring PHPUnit 9 support into 6.x:

It is highly likely that PHPUnit 8 won’t work in at least one of PHP 8.0, 8.1, 8.2, or 8.3. Since Laravel 6.0 is LTS, it is likely that we will want to continue to support newer versions of PHP, and so we need to be able to run on the latest PHPUnit.

Redis Connection is Macroable

Matt Allan contributed macros for the Redis connection. Like any other macroable class in Laravel, you can call the macro() method:

use Illuminate\Redis\Connections\Connection;
 
Connection::macro('foo', function () {
return 'foo';
});

This release had quite a few changes, so be sure to check out the full list of new features and updates below. You can see the whole diff between 6.9.0 and 6.10.0 on GitHub. The full release notes for Laravel 6.0 are available in the GitHub in the v6 changelog:

v6.10.0

Added

  • Added withoutMix() and withMix() test helpers (#30900)
  • Added validateWithBag() macro to Request (#30896)
  • Added PHPUnit 9 support (#30947)
  • Added exclude_if and exclude_unless validation rules (#30835, c0fdb56)
  • Added generated columns (virtual/stored) support for PostgreSQL (#30971)
  • Added mixin support to Eloquent builder (#30978, 28fa74e)
  • Make the Redis Connection Macroable (#31020)
  • Added PackageManifest::config() method (#31039, 9b73540)
  • Added redis.connection aliases in container (#31034)
  • Extracted CallsCommands feature from Illuminate\Console\Command (#31026, ef72716)
  • Allowed absolute file path for Storage::putFile() (#31040)

Changed

  • Handled passing too many arguments to @slot (#30893, 878f159)
  • Make ThrottleRequestsException extend TooManyRequestsHttpException (#30943)
  • Used league/commonmark instead of erusev/parsedown for mail markdown (#30982)
  • Regenerate token on logout (b2af428)
  • Make RedisQueue::getConnection() public (#31016)
  • Delete dependency graham-campbell/testbench-core (#30989)
  • Resolve Faker\Generator out of the container if it is bound (#30992)

Fixed

  • Fixed float database types in Blueprint (#30891)
  • Fixed code that depended on getenv() (#30924)
  • Prevented making actual pdo connections while reconnecting (#30998)
  • Fixed exclude_if \ exclude_unless validation rules for nested data (#31006)
  • Update dev-master branch aliases from 6.0-dev to 6.x-dev (d06cc79)
  • Utilize Symfony’s PSR Factory. Fixed #31017 (#31018, #31027)
  • Used model connection by default in the database validators (#31037)

Optimization

  • Optimize Service Provider registration (#30960)
  • Optimize runningInConsole method (#30922)
  • Delay instantiation of translator and view factory (#31009)

Deprecated

  • Deprecate PendingMail::sendNow() and remove unneeded check (#30999)

Reverted

Refactoring

  • Refactoring of BladeCompiler::compileString() method (08887f9)
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
No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project.

Visit No Compromises
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
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 →
DirectoryTree Authorization is a Native Role and Permission Management Package for Laravel image

DirectoryTree Authorization is a Native Role and Permission Management Package for Laravel

Read article
Sort Elements with the Alpine.js Sort Plugin image

Sort Elements with the Alpine.js Sort Plugin

Read article
Anonymous Event Broadcasting in Laravel 11.5 image

Anonymous Event Broadcasting in Laravel 11.5

Read article
Microsoft Clarity Integration for Laravel image

Microsoft Clarity Integration for Laravel

Read article
Apply Dynamic Filters to Eloquent Models with the Filterable Package image

Apply Dynamic Filters to Eloquent Models with the Filterable Package

Read article
Property Hooks Get Closer to Becoming a Reality in PHP 8.4 image

Property Hooks Get Closer to Becoming a Reality in PHP 8.4

Read article