Laravel 10.41, weekly updates, and 🔥 tip

Laravel 10.41

Couple new features this weeks brings us to Laravel 10.41. Here are the highlights:

  • Add an option to specify the models directory for artisan model:prune in #49617
  • Add threshold parameter to Number::spell in #49610
  • Allow jobs to be conditionally dispatched with dispatchIf and dispatchUnless in #49624
  • Add base parameter to Str::toInteger in #49670
  • Officially support floats in Translator::choice in #49693

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 was able to return to the Laravel 11.x Shift. Got some momentum on the slimming of the skeleton. I am very excited about these changes. This will not only reduce some of the noise within a Laravel application, but also the ongoing maintenance of these ever changing files.

While some of these core files will always be present, removing them by default will make future Laravel Shifts easier. I'll be able to focus more on automating changes in your application code, instead of framework file changes.

In between working on the Laravel 11.x Shift, I made a few tweaks to the HTML Converter based on user feedback. I also put in a few hours on a Human Shift.

As far as the side-project, I recently partnered with Joey Farruggio. He was working on his own side-project with complimentary features. So we are merging those and refining the UX before the public beta.

🔥 Tip

Part of the Laravel 11.x Shift is streamlining the config files. This involves a lot of array comparisons (and recursion). I found myself using dot notation, but then needing to manipulate the path. I was using Str::before() and Str::after(). Then I remembered the recently added Str::between(). Definitely helpful.

Now I'm wondering if there is an opportunity for more methods dealing with a delimited string. I actually wrote ColdFusion back in the day and it had a first-party type for this called lists. I'm thinking methods like: segment, segmentBefore, and segmentAfter. These could help quickly extract segments from a delimited string, instead of dancing around with between or using explode directly.

Let me know what you think... If there's interest, maybe I'll live-stream a quick PR...