Laravel 9.24, weekly updates, and 🔥 tip

Laravel 9.24

Lots of new features this week and more commands, bringing us to Laravel 9.24. Here are the highlights:

  • New db:show, db:table, and db:monitor commands in #43367
  • Add validation doesnt_end_with rule in #43518
  • Fix unique locking on broadcast events in #43516
  • Allow @class() for component tags in #43140
  • Add mergeUnless to ConditionallyLoadsAttributes trait in #43567
  • Add whenNull to ConditionallyLoadsAtrributes trait in #43600
  • Make Config repository macroable in #43598

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 I live streamed spawning new workers dynamically based on queue workload. I completed the proof of concept during the stream. So Thursday I spend time looking into shutting down the extra workers once the queues emptied.

I ended up diving into the Horizon source for some tips. Along the way I found a few features I'd like to add to make things like this a little easier. Hopefully I'll open some PRs this week.

I also had a Human Shift come in last week. This time upgrading a Laravel application from 5.1 to 9.x. Since they were not using many packages and followed Laravel conventions, it only took me about 6 hours.

I also launched the first Django Shift. A few months ago Bryce Thornton reached out to me with the idea after reading my article about grinding on Shift for the last 6 years. He presented the opportunity to make Shifts for Django and we agreed to try one for the upcoming Django 4.1 release.

As noted in the article, building Shifts for other frameworks is something I had passed on. Admittedly Django would not be my top choice. But he was interested in it and created an MVP for the automation. So Friday I quietly released the Django 4.1 Shift to upgrade an Django application from 4.0 to 4.1 for free. We plan to build Django Shifts working our way back down to more common versions, like Django 3.2.

We're traveling the rest of this week since Izzy's daycare is closed. So I will likely be working on those Horizon PRs and pairing to finish the Human Shift.

🔥 Tip

I've said this before, but I'll say it again with a little more 🌶: You should follow the Laravel conventions.

This means not only the coding practices, but the structure and principles too. Jess once said if there's not an artisan make command for it or example code in the docs, it's not a Laravel convention.

I understand there are sometimes exceptions. But they are exactly that, exceptions. Some might share their different way of doing something. But you do not need to do it that way. If you did, you'd know it and have your own exceptions to their exceptions.

I say, YAGNI. You should kick any unconventional change down the road as far as you possibly can. Then when you think you really need it, keep kicking it. Eventually you'll arrive at the same conclusion, YAGNI. 🔥