Laravel 11.20, weekly updates, and 🔥 deals

Laravel 11.20

Lots of commits over the last week bringing us to Laravel 11.20. Here are some highlights:

  • Matching Request methods for ValidationInput in multiple commits
  • Add middleware before sending request and dispatching events in #52323
  • Add collapseWithKeys to Collection in #52347
  • Add deduplicate to strings in #52350
  • Add inverse queue assertions: assertNotDeleted, assertNotFailed, and assertNotReleased in #52320
  • Set custom view path when making components in #52219
  • Add whenExistsLoaded to conditionally include relationship existence attribute in #52295
  • Add in and inHidden to Context in #52346
  • Allow enums to be passed to AssertableJson methods in #52360
  • In MySQL, harvest last insert ID immediately after query is executed in #52390

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 had a bunch of meetings: potential pairs for new side-projects, demos for wppm.io, and another new Human Shift.

With all of that, and the girls were out of daycare yesterday and today, I haven't gotten written much code. I managed to squeeze in a quick pairing session with Caen to break ground on our new side-project. I also took the opportunity to livestream a Human Shift to demo my process for upgrading old Laravel applications.

The girls head back to daycare tomorrow, so with the rest of the week I will complete the Human Shift, do more livestreams on Mockery, and hopefully get another pairing session with Caen.

🔥 Tip

It's not often that I create a brand new Laravel project. It's actually one of the reasons I'm taking on more side-projects - to stay fresh.

When creating the new side-project with Caen, we immediately added some of the new options to enforce certain restrictions within our application. In this case, we added the following to the boot method of our AppServiceProvider:

Model::shouldBeStrict();
DB::prohibitDestructiveCommands($this->app->isProduction());

These essentially prevent footgun scenarios. In this case, ensuring we're being explicit on what we query and what we set on models. Also to not run any destructive database commands in production. Such as migrate:fresh.

For more details on these, check out the Laravel News post and this PR.