Laravel 8.81, weekly updates, and 🔥 tip

Laravel 8.81

Couple improvements and new features in this week's release of Laravel 8.81.

Here are the highlights:

  • Improve PhpRedis flushing in #40544
  • Allow whitespace in PDO dbname for PostgreSQL in #40483
  • Add sscanf, ucsplit, and flushCache to Str in #40472, #40499, #40620
  • Allow authorizeResource to receive array of models and parameters in #40516
  • Allow caching to be disabled for virtual attributes accessors that return an object in #40519
  • Add better bitwise operators support in #40529
  • Add getOrPut to Collection in #40535

You may review the full branch diff on GitHub for a complete list of changes.

This version bump and update is automated for subscribers to a Shifty Plan. If you don't have one of those, be sure to bump your constraint and run composer update to get the latest features.

Weekly Journal

Last week Jess and I completed the automation for the Laravel 9.x Shift. While this Shift includes the current changes, the official release was pushed out to February 8. Likely to align with Laracon Online. We'll add more automation for any last minute changes to Laravel 9 over the next two weeks.

A reminder this beta release is offered at a discounted price until the official release. Anyone who runs the Laravel 9.x Shift is entitled to a free rerun. So, if you'd like to test your application running Laravel 9, don't hesitate to give it a try.

A Human Shift came in at the end of the week. It was a pretty conventional application running Laravel 5.6. I was able to upgrade and modernize it in less than 5 hours.

I hope to find some clients willing to allow me record the upgrade process. I think this would help market Shift, but also demonstrate tips and tricks for using Shift to upgrade old Laravel applications.

This week I'm going to focus on some new features for Shifty Plans. I want to improve sharing Shifts and access amongst a team. I also want to finish a feature to only run automation for Laravel security releases instead of each patch release.

🔥 Tip

Since Laravel 9 will require PHP 8.0 as a minimum, there are two nice refactors I'm making in my applications.

The first is the removal of the optional helper in favor of PHP's native nullsafe operator:

// before
optional($this->user)->name;
 
// after
$this->user?->name;

The other is the adoption of anonymous migrations. Adopting these means never having to worry about class names conflicts when creating migrations again.

return new class extends Migration {
public function up()
{
// ...
}
};

Both of these are available now as Workbench tasks and are included as part of the automation in the Laravel 9.x Shift. 🔥