Laravel 10.21, weekly updates, and 🔥 tip

Laravel 10.21

Mostly new features to the Str class and counting jobs this week brings us to Laravel 10.21. Here are the highlights:

  • Add broadcastAs at BroadcastNotificationCreated in #48136
  • Add start and end string replacement and prune methods in #48025
  • Add convertCase to Str in #48224
  • Allow failed jobs to be counted by "connection" and "queue" in #48216
  • Give access to job UUID in the job queued event in #48179

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 continued on the Shift CLI and quietly released the alpha version. So now I'll more publicly announce the alpha release - check out the new Shift CLI to run the free Workbench tasks directly from your command line.

I hope to include premium tasks in the alpha version later this week. I still need to setup Satis and automate the bundling of the two packages. I've never done either, so that will be fun.

Also this week, I'm toying around with a new Shift idea. It was something I scripted in the recent Human Shifts. Doing it a few times now, I figured why not just turn that into a Shift. It'll be worth it even if I'm the only one who uses it when upgrading apps for Human Shifts. But my guess is others will have a need too.

🔥 Tip

A lot of the core PHP functions accept flags. Sometimes I forget you can pass multiple flags using bitwise operators. This week's tip is a two-for-one.

First, don't forget the check the flags available in a function. For example, preg_match_all().

Second, don't forget the power of bitwise operators. Very useful for flags, but also boolean operations. For example, tracking dirtiness: $dirty |= true;