Laravel 8.50, weekly updates, and 🔥 tip

Laravel 8.50

A few big features this week bringing Laravel to 8.50.0. Here are the highlights:

  • Ability to cancel notifications prior to sending in #37930
  • Prunable models to remove obsolete records in #37889
  • Cursor pagination fixes in #37762 and #37915
  • Support both CommonMark 1.x and 2.x in #37954
  • Optional excludeUnvalidatedArrayKeys() to exclude keys not validated by validation rules in #37943
  • Clear config after dumping auto-loaded files in #37985

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 continued support of the Workbench desktop app. This takes a bit more of my time than I expected. Then again, it's a rather complex project. Similar to Shift, it has to support various project and coding styles. Further, it has to support multiple platforms with various setups. Then throw in the usual issues with Docker for giggles. Honestly it's sometimes amazing it works at all.

Anyway, we resolved several issues, focusing mainly on improving the stability of the PHP tasks.

Last week we released 3 new tasks. Today we released 2 more tasks for automating BaseCode practices like using early returns and removing dead code.

We hedged a bit this time by adding an "Experimental" tag to these tasks. We will continue to refine them over the next few weeks.

Had one Human Shift come in last week which I completed right away. A few more came in this morning which I will work on later this week.

In the meantime, Jess and I are going to update the Workbench landing page with new screenshots and testimonials. We also plan to update the main landing page to emphasize the pain points Shift solves.

If we have time, we will also revisit the cloud-based Workbench to add any UX improvements we made to the desktop app. That way we have feature parity between the web and desktop versions.

🔥 Tip

I ran a few of the free, PHP 8 tasks included with the Workbench on the laravelshift.com codebase. One of them converted a few strpos() to str_contains().

While this function has always been available through the Laravel String helper, it's now a native function available in PHP 8.

So the following:

1if (strpos($log, 'created pull request:') !== false) {
2 // ...
3}

Was convert to:

1if (str_contains($log, 'created pull request:')) {
2 // ...
3}

I find this reads much better not only in the function naming, but also avoids the relatively complex (and occasionally forgotten) boolean safe check.

So, yet another way to streamline and modernize your code. 🔥