Laravel 8.17, weekly updates, and 🔥 tip

Laravel 8.17

A few new (and very helpful) features added this week, so we get a minor version bump to 8.17.0.

  • Add withinTransaction callback in 923e277ad
  • Update Tailwind pagination focus styles in #35365
  • Add dd and dump to the request object in #35384
  • Fix self-relation issue for withAggregate in #35392
  • Allow passing connection name in #35402
  • Fix validating image/jpeg images for Symfony/Mime update in #35419
  • Fix fail to morph with custom casting to objects in #35420

You may review the full branch diff on GitHub for a complete list of changes.

This minor 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

Finished up all the Human Shifts last week. A few new ones this week, but possibly on the downhill now. I have a list of tweaks to make to some of the older Laravel Shifts and added a tiny streamline to the Laravel Fixer.

Jess and Len have finished up their design facelift and animated logo, respectively. So hopefully this week I'll steal some time from Jack to give things a final review.

Outside of that, I'm going to write some more Dusk tests for some of Stripe's card failure paths. I believe there is an edge case for cards that need additional verification. The more I work on these pieces, the more I think I'll move to Stripe's billing portal. Unfortunately, it wasn't available when I upgraded these sections earlier in the year.

🔥 Tip {#tip}s

Let's get back into the swing of things with some 🔥 code tips. I tweeted a few out over the last week.

First, I stumbled upon the super expressive foreignIdFor migration method. There was some debate about referencing models in migrations. I have run into the annoyance of dead references as apps evolve. However, I don't feel strongly enough about it to draw any hard lines against using this method.

Next, one related to my ideal Laravel folder structure. After working with hundreds of Laravel applications, I'm a firm believer in keeping things as default as possible. Outside some subfolder organization, I try to only add the folders Laravel does with artisan make commands. I have two simple exceptions - adding Contracts and Support when necessary. Both being a nod to Laravel's own folder structure. Providing some nice symmetry with the framework.