Laravel 8.76, weekly updates, and 🔥 tip

Laravel 8.76

Lots of features this week and some fast-follow patches brings us to Laravel 8.76.2. Here are the highlights:

  • Fix withTrashed on routes check if SoftDeletes is used in Model in #39958
  • Fix model:prune --pretend command for models with SoftDeletes in #39991
  • Fix SoftDeletes force deletion sets "exists" property to false only when deletion succeeded in #39987
  • Add possibility to customize child model route binding resolution in #39929
  • Add Response::reason() in #39972
  • Add afterRefreshingDatabase test method in #39978
  • Add unauthorized and forbidden to Response in #39979
  • Publish view-component.stub in #40007
  • Add invisible modifier for MySQL columns in #40002
  • Add substrReplace method to Str and Stringable in #39988

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

We took our first little family vacation last week to the beach. We just got back yesterday. Which is why this newsletter is going out a day late.

Last week I continued live streaming to build a new Laravel application from scratch. I plan to continue working on that more next week.

Jess made more tweaks to the Tailwind 3.x Shift after Tailwind 3 was officially released last Thursday. I deployed all those tweaks this morning. We plan to upgrade laravelshift.com to Tailwind 3 in our pairing session tomorrow.

Provided everything goes smoothly, we'll make some final tweaks. Then I will likely raise it to full price ($19), next Monday. So, if you're ready for Tailwind 3, upgrade now to take advantage of our introductory pricing.

A few more Human Shifts came in over the weekend. So I'll likely spend the rest of the week completing those. If I have any time left, I may look at a pesky bug I keep receiving when asserting two Eloquent collections in tests.

🔥 Tip

I noticed this tweet from Nuno removing the server.php file from Laravel applications.

This, of course, is something the Laravel 9.x Shift will automate provided it is not modified. Which brings me to the point of this tip, avoid modifying core files.

I know I have beat this drum for a while. However, modifying core file greatly increases the pain of maintenance. Some modifications are worse than others, for example, overwriting Laravel methods, helpers, or vendor files (please don't).

Even seemingly harmless modifications like those to files within a default Laravel application can increase pain. The config files are a prime example.

Shift goes a long way to soothe this. But ultimately, lessening the number of files included in a default Laravel application is the big win. I think (and hope) the removal of server.php is just the beginning. 🔥