Release Notes

Versioning Scheme

Laravel's versioning scheme maintains the following convention: paradigm.major.minor. Major framework releases are released every six months (February and August), while minor releases may be released as often as every week. Minor releases should never contain breaking changes.

When referencing the Laravel framework or its components from your application or package, you should always use a version constraint such as 5.7.*, since major releases of Laravel do include breaking changes. However, we strive to always ensure you may update to a new major release in one day or less.

Paradigm shifting releases are separated by many years and represent fundamental shifts in the framework's architecture and conventions. Currently, there is no paradigm shifting release under development.

Support Policy

For LTS releases, such as Laravel 5.5, bug fixes are provided for 2 years and security fixes are provided for 3 years. These releases provide the longest window of support and maintenance. For general releases, bug fixes are provided for 6 months and security fixes are provided for 1 year. For all additional libraries, including Lumen, only the latest release receives bug fixes.

VersionReleaseBug Fixes UntilSecurity Fixes Until
5.0February 4th, 2015August 4th, 2015February 4th, 2016
5.1 (LTS)June 9th, 2015June 9th, 2017June 9th, 2018
5.2December 21st, 2015June 21st, 2016December 21st, 2016
5.3August 23rd, 2016February 23rd, 2017August 23rd, 2017
5.4January 24th, 2017July 24th, 2017January 24th, 2018
5.5 (LTS)August 30th, 2017August 30th, 2019August 30th, 2020
5.6February 7th, 2018August 7th, 2018February 7th, 2019
5.7September 4th, 2018March 4th, 2019September 4th, 2019

Laravel 5.7

Laravel 5.7 continues the improvements made in Laravel 5.6 by introducing Laravel Nova, optional email verification to the authentication scaffolding, support for guest users in authorization gates and policies, console testing improvements, Symfony dump-server integration, localizable notifications, and a variety of other bug fixes and usability improvements.

Laravel Nova

Laravel Nova is a beautiful, best-in-class administration dashboard for Laravel applications. The primary feature of Nova is the ability to administer your underlying database records using Eloquent. Additionally, Nova offers support for filters, lenses, actions, queued actions, metrics, authorization, custom tools, custom cards, custom fields, and more.

To learn more about Laravel Nova, check out the Nova website.

Email Verification

Laravel 5.7 introduces optional email verification to the authentication scaffolding included with the framework. To accommodate this feature, an email_verified_at timestamp column has been added to the default users table migration that is included with the framework.

To prompt newly registered users to verify their email, the User model should be marked with the MustVerifyEmail interface:

  1. <?php
  2. namespace App;
  3. use Illuminate\Notifications\Notifiable;
  4. use Illuminate\Contracts\Auth\MustVerifyEmail;
  5. use Illuminate\Foundation\Auth\User as Authenticatable;
  6. class User extends Authenticatable implements MustVerifyEmail
  7. {
  8. // ...
  9. }

Once the User model is marked with the MustVerifyEmail interface, newly registered users will receive an email containing a signed verification link. Once this link has been clicked, Laravel will automatically record the verification time in the database and redirect users to a location of your choosing.

A verified middleware has been added to the default application's HTTP kernel. This middleware may be attached to routes that should only allow verified users:

  1. 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,

{tip} To learn more about email verification, check out the complete documentation.

Guest User Gates / Policies

In previous versions of Laravel, authorization gates and policies automatically returned false for unauthenticated visitors to your application. However, you may now allow guests to pass through authorization checks by declaring an "optional" type-hint or supplying a null default value for the user argument definition:

  1. Gate::define('update-post', function (?User $user, Post $post) {
  2. // ...
  3. });

Symfony Dump Server

Laravel 5.7 offers integration with Symfony's dump-server command via a package by Marcel Pociot. To get started, run the dump-server Artisan command:

  1. php artisan dump-server

Once the server has started, all calls to dump will be displayed in the dump-server console window instead of in your browser, allowing you to inspect the values without mangling your HTTP response output.

Notification Localization

Laravel now allows you to send notifications in a locale other than the current language, and will even remember this locale if the notification is queued.

To accomplish this, the Illuminate\Notifications\Notification class now offers a locale method to set the desired language. The application will change into this locale when the notification is being formatted and then revert back to the previous locale when formatting is complete:

  1. $user->notify((new InvoicePaid($invoice))->locale('es'));

Localization of multiple notifiable entries may also be achieved via the Notification facade:

  1. Notification::locale('es')->send($users, new InvoicePaid($invoice));

Console Testing

Laravel 5.7 allows you to easily "mock" user input for your console commands using the expectsQuestion method. In addition, you may specify the exit code and text that you expect to be output by the console command using the assertExitCode and expectsOutput methods. For example, consider the following console command:

  1. Artisan::command('question', function () {
  2. $name = $this->ask('What is your name?');
  3. $language = $this->choice('Which language do you program in?', [
  4. 'PHP',
  5. 'Ruby',
  6. 'Python',
  7. ]);
  8. $this->line('Your name is '.$name.' and you program in '.$language.'.');
  9. });

You may test this command with the following test which utilizes the expectsQuestion, expectsOutput, and assertExitCode methods:

  1. /**
  2. * Test a console command.
  3. *
  4. * @return void
  5. */
  6. public function test_console_command()
  7. {
  8. $this->artisan('question')
  9. ->expectsQuestion('What is your name?', 'Taylor Otwell')
  10. ->expectsQuestion('Which language do you program in?', 'PHP')
  11. ->expectsOutput('Your name is Taylor Otwell and you program in PHP.')
  12. ->assertExitCode(0);
  13. }

URL Generator & Callable Syntax

Instead of only accepting strings, Laravel's URL generator now accepts "callable" syntax when generating URLs to controller actions:

  1. action([UserController::class, 'index']);

Laravel 5.7 allows you to control how many additional links are displayed on each side of the paginator's URL "window". By default, three links are displayed on each side of the primary paginator links. However, you may control this number using the onEachSide method:

  1. {{ $paginator->onEachSide(5)->links() }}

Filesystem Read / Write Streams

Laravel's Flysystem integration now offers readStream and writeStream methods:

  1. Storage::disk('s3')->writeStream(
  2. 'remote-file.zip',
  3. Storage::disk('local')->readStream('local-file.zip')
  4. );