Laravel 10.38, weekly updates, and 🔥 tip

Laravel 10.38

Lots of patch releases last week (which my PR snuck in to) and lots of features this week brings us to Laravel 10.38. Here are the highlights:

  • Ability to test chained job via closure #49337
  • Add progress option to PendingBatch #49273
  • Add fromRoute to TestRequest #49366
  • Fix primary key creation for MySQL with sql_require_primary_key enabled #49374
  • Add charset and collation method to Blueprint #49396
  • Add @session Blade directive #49339
  • Add SQLite support for whereJsonContains method #49401
  • Introducing isEmpty and isNotEmpty to ComponentAttributeBag #49408
  • Drop the primary key if it exists when adding a new primary key #49392

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 a few more Human Shift hours were purchased to help finish an upgrade before the end of the year. So I'll continue on that between daily support and the side-project.

I spend a few hours working on a proof-of-concept for the Laravel 11.x Shift. Most Shifts leverage the existing Shift Engine. But occasionally, one might need some new code to handle its automation. So I did some quick tests to prove it'll work.

The rest of my time was spent on the side-project. I'm trying to launch it (quietly) by the end of the year. I demoed the MVP to some alpha testers last week and got a lot of good feedback. So I'm scrambling to implement what's critical and shelve the rest until after launch. We'll see.

🔥 Tip

In working on the side-project, I stumbled upon another feature in Laravel - the @checked and @selected Blade directives.

I had always wrapped the attribute in a nasty inline @if directive, but now I can simply put the logic in one of these self-contained directives.

Example using @if:

<input type="checkbox"
name="switch"
@if(old('switch', $switch) === 'on') checked @endif
>

Same example using @checked:

<input type="checkbox"
name="switch"
@checked(old('switch', $switch) === 'on')
>