Laravel 9.2, weekly updates, and 🔥 tip

Laravel 9.2

More new features in this week's release of Laravel 9.2. Here are the highlights:

  • Fix firstWhere to return null in #41099
  • Add Attribute::with in #41014
  • Add Arr::keyBy in #41029
  • Adds expectsOutputToContain to the PendingCommand in #40984
  • Support for enum in Builder::whereRelation in #41091
  • Add X-* headers when using Mail::alwaysTo in #41101
  • Added betweenFirst to Stringable in #41144
  • Allow specifying custom messages for Rule objects in #41145

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

I spent most of last week working on Human Shifts. One was all the way back from Laravel 4.2. Another was from Laravel 5.2 and one to upgrade between LTS versions (6.x - 9.x). All of them are now in review.

I also spent some time making tweaks to the Laravel 9.x Shift. At this point I feel it's pretty solid. But I'll continue to monitor the Upgrade Guide and default project for any updates.

I also recorded using Shift to upgrade another one of my own projects - Confident Laravel. This time it took just under 5 minutes. Jess also dogfooded Shift on her RocketLog app. Even though she helped build the Laravel 9.x Shift, she was still pretty impressed.

With everything in a good place, we're going to shift (no pun) our focus back to the Workbench. We want to make some Laravel 9 specific tasks. There are also a lot of outstanding issues reported over the last few months that we didn't get to.

🔥 Tip

With each new Laravel release comes more user feedback. Often from new users. I review all of the feedback emails for a chance to improve Shift. So over the next few newsletters, I'm going to turn this section into 🔥 tips for Shift.

Aside from package compatibility, a common bit of feedback is the amount of changed files to review.

First, Shift makes all changes in nice, atomic commits. So you may review individual commits to focus in on a set of changes and limit the noise of a large PR.

Second, since the automation is repetitive, Shift may change a lot of files for large applications. As such, large diffs are unavoidable. One of the common changes relate to code style.

Shift may be configured to use your custom code style. If you forget to configure this for a Shift, you may apply it afterward and push up those changes. This should effectively revert any code style changes by Shift and reduce the overall number of files changed.

Alternatively, you may, of course, request a rerun.