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
Tinkerwell

Enjoy coding and debugging in an editor designed for fast feedback and quick iterations. It's like a shell for your application – but with multi-line editing, code completion, and more.

Visit 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
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
Lucky Media logo

Lucky Media

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

Lucky Media
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
Laravel Cloud logo

Laravel Cloud

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

Laravel Cloud
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Shift logo

Shift

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

Shift
PhpStorm logo

PhpStorm

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

PhpStorm
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

The latest

View all →
Turn PHP Attributes Into Docs With Signal image

Turn PHP Attributes Into Docs With Signal

Read article
USAIGE: Track Token Usage and Costs for Laravel AI SDK Requests image

USAIGE: Track Token Usage and Costs for Laravel AI SDK Requests

Read article
Help make Filament faster! image

Help make Filament faster!

Read article
Yammi Audit Log: Track Who Really Made a Change Across Jobs and Queues image

Yammi Audit Log: Track Who Really Made a Change Across Jobs and Queues

Read article
Route Metadata Support in Laravel 13.17 image

Route Metadata Support in Laravel 13.17

Read article
Ship AI with Laravel: Failover, Queues, and Middleware for AI Agents image

Ship AI with Laravel: Failover, Queues, and Middleware for AI Agents

Read article