Laravel v6.10 Is Here


January 8th, 2020


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:

1// Before
2$this->swap(\Illuminate\Foundation\Mix::class, function () {
3 return '';
6// After

Validate With Bag Request Macro

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

1$request->validateWithBag('blog', [
2 'title' => ['required', 'unique:posts', 'max:255'],
3 '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:

1use Illuminate\Redis\Connections\Connection;
3Connection::macro('foo', function () {
4 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:



  • 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)


  • 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 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)


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


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



  • Refactoring of BladeCompiler::compileString() method (08887f9)

Filed in:

Paul Redmond

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