Never Miss a Laravel Release 🚀
A few patch releases have been tagged since the release of Laravel 7 last week. Patch fixes are quite common at the beginning of a significant release as users start to upgrade and report issues.
The latest release is Laravel 7.0.8, which includes a new Mailable::when() method to conditionally run some code. Here’s the example from the pull request, which would call the closure when the first argument is true:
return $this->from('info@example.com') ->when($cv, function ($message) use ($cv) { $message->attach($cv->getRealPath(), [ 'as' => $cv->getClientOriginalName(), 'mime' => $cv->getClientMimeType(), ]); }) ->subject('Example subject') ->view('mail.example');
Laravel 7.0.6 added a queue suffix to the SQS driver configuration:
'suffix' => env('SQS_SUFFIX'),
Other than that, the other fixes are for things like method signatures and user-reported issues. I suggest 7.x users update to the latest to get all the latest improvements.
You can see the full list of new features and updates below and the whole diff between 7.0.0 and 7.0.8 on GitHub. The full release notes for Laravel 7.0.1 through 7.0.8 are available in the latest v7 changelog.
v7.0.8
Added
- Added
Illuminate\Mail\Mailable::when()method (#31828) - Allowed dynamically adding of routes during caching (#31829)
Fixed
- Match Symfony’s
Command::setHiddendeclaration (#31840)
Changed
- Update the encryption algorithm to provide deterministic encryption sizes (#31721)
v7.0.7
Fixed
- Fixed type hint for
Request::get()method (#31826) - Add missing public methods to
Illuminate\Routing\RouteCollectionInterface(e4f477c)
v7.0.6
Added
- Added queue suffix for SQS driver (#31784)
Fixed
- Fixed model binding when route cached (af80685)
- Fixed incompatible
Factorycontract forMailFacade(#31809)
Changed
- Fixed typehints in
Illuminate\Foundation\Application::handle()(#31806)
v7.0.5
Fixed
- Fixed
Illuminate\Http\Client\PendingRequest::withCookies()method (36d783c) - Catch Symfony
MethodNotAllowedExceptionexception inCompiledRouteCollection::match()method (#31762) - Fixed a bug with slash prefix in the route (#31760)
- Fixed root URI not showing in the
route:list(#31771) - Fixed model restoring right after soft deleting it (#31719)
Changed
- Throw exception for duplicate route names in
Illuminate\Routing\AbstractRouteCollection::addToSymfonyRoutesCollection()method (#31755) - Changed
Illuminate\Support\Str::slug()method (e4f22d8) - Check if an array lock exists before releasing it in
Illuminate\Cache\ArrayLock::release()(#31795) - Revert disabling expired views checks (#31798)
v7.0.4
Changed
- Changed of route prefix parameter parsing (b38e179)
v7.0.3
Fixed
- Fixed route caching attempt in
Illuminate\Routing\CompiledRouteCollection::newRoute()(90b0167) - Catch Symfony exception in
CompiledRouteCollection::match()method (#31738) - Fixed Eloquent model casting (2b395cd)
- Fixed
UrlGeneratorconstructor (#31740)
Changed
- Added message to
Illuminate\Http\Client\RequestException(#31720)
v7.0.2
Fixed
- Fixed
ascii()\isAscii()\slug()methods on theStrclass with null value in the methods (#31717) - Fixed
trimof the prefix in theCompiledRouteCollection::newRoute()(ce0355c, b842c65)
Changed
- remove comments before compiling components in the
BladeCompiler(2964d2d)
v7.0.1
Fixed
- Fixed
Illuminate\View\Component::withAttributes()method (c81ffad)