Laravel 7.8 Released

Published on by

Laravel 7.8 Released image

Never Miss a Laravel Release 🚀

Sign up and get an email with each new Laravel release

The Laravel team released v7.8.0 with new takeWhile and takeUntil collection methods, along with all the latest new features, fixes, and changes in the 7.x branch. Let’s look at a few new features released in 7.8:

Redirector Signed Routes

Ryan Chandler contributed shortcut methods for generating signed routes from the Redirector service:

// Example
redirect()->to(URL::signedRoute(...));
 
// Using `signedRoute` and `temporarySignedRoute`
redirect()->signedRoute($route, $parameters, $expiration, $status, $headers);
 
// and
 
redirect()->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);

Use-cases for these new methods are relatively edge-case, and I would advise reading the discussion in the Pull Request before reaching for these methods.

The takeUntil and takeWhile Collection Methods

Joseph Silber contributed a takeUntil and takeWhile collection methods, also making them support lazy collections. The documentation has updated details about these two methods.

First, here’s some examples of using the takeUntil method (until is an alias of takeUntil with this release):

$collection = collect([1, 2, 3, 4]);
 
$subset = $collection->takeUntil(function ($item) {
return $item >= 3;
});
 
$subset->all();
// [1, 2]
 
// Passing a primitive value
$subset = $collection->until(3);
$subset->all();
// [1, 2]

Next, here’s an example of takeWhile:

$collection = collect([1, 2, 3, 4]);
 
$subset = $collection->takeWhile(function ($item) {
return $item < 3;
});
 
$subset->all();
// [1, 2]

Check out Pull request #32496 and #32494 for implementation details, and the updated collection documentation for usage examples.

Release Notes

While we didn’t look at all the new features in this post, you can see the full list of new features and updates below and the diff between 7.7.0 and 7.8.0 on GitHub. The full release notes for Laravel 7.x are available in the latest v7 changelog:

v7.8.0

Added

  • Added signedRoute() and temporarySignedRoute() methods to Illuminate\Routing\Redirector (#32489)
  • Added takeUntil and takeWhile collection methods (#32494, #32496)
  • Added Illuminate\Container\ContextualBindingBuilder::giveTagged() (#32514)
  • Added methods withFragment and withoutFragment to Illuminate\Http\RedirectResponse (11d6bef, 0099591, 42c67a1, a1e741a)
  • Added exclude_without validation rule (4083ae5)

Fixed

  • Fixed compiled route actions without a namespace (#32512)
  • Reset select bindings when setting select (#32531)

Changed

  • Added warn in Illuminate/Support/Facades/Auth::routes() when laravel/ui is not installed (#32482)
  • Added auth to each master on Illuminate\Redis\Connections\PhpRedisConnection::flushdb() (837921b)
  • Register opis key so it is not tied to a deferred service provider (Illuminate/Encryption/EncryptionServiceProvider.php) (62d8a07)
  • Pass status code to schedule finish (#32516)
  • Check route:list –columns option case insensitively (#32521)

Deprecated

  • Deprecate Illuminate\Support\Traits\EnumeratesValues::until (#32517)
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
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech
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 $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
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
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

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

Lucky Media

The latest

View all →
Build a Laravel Scout Search Endpoint With the HTTP QUERY Method image

Build a Laravel Scout Search Endpoint With the HTTP QUERY Method

Read article
Enforce Per-Action Waiting Periods in Laravel with Cooldown image

Enforce Per-Action Waiting Periods in Laravel with Cooldown

Read article
First-Party Image Processing in Laravel 13.20 image

First-Party Image Processing in Laravel 13.20

Read article
Laravel Legacy Bridge: Carry Authenticated Sessions from a Legacy App into Laravel image

Laravel Legacy Bridge: Carry Authenticated Sessions from a Legacy App into Laravel

Read article
Laravel Quota: Usage Budgets for Calendar Periods image

Laravel Quota: Usage Budgets for Calendar Periods

Read article
Find the Security Vulnerabilities in Your Laravel App with Sensagraph image

Find the Security Vulnerabilities in Your Laravel App with Sensagraph

Read article