Laravel 9.9, weekly updates, and 🔥 tip
Laravel 9.9
Not too much this week. Just a few fixes and additions. This brings us to Laravel 9.9.
- Add
getAllTables
support for SQLite and SQLServer schema builder in #41896 - Add
withoutEagerLoads
to query builder in #41950 - Use configured session domain for maintenance cookie in #41961
- Add
throw
to PendingRequest in #41953 - Fix replacements for nested localization arrays in #42022
- Configurable pluralizer language and uncountables in #41941
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 we were on vacation. However, that didn't stop me from working a little bit. I always need to answer support emails, which I do in the morning and again in the evening.
But I also worked on a feature I had been putting off for years - cart abandonment emails.
I went deeper into this decision in this Twitter thread, but the tl;dr; version is I felt it might help reach the skeptics. Shift has a very high reuse rate. So I know if I can get them to try Shift, it's likely they'll use Shift again.
Yesterday, I focused on making tweaks to the automation from the support emails which came in last week. I also had a quick Pairing session.
This week I'll continue making tweaks and merging PR's from Saurabh's work. I may try to do some live-streams later this week too.
🔥 Tip
I noticed a pattern in some of the feedback emails last week. Some dependencies weren't getting bumped by Shift.
At first these seemed like unpopular packages. So maybe Shift wasn't tracking them. But then some of Spatie's packages appeared.
In digging deeper, I found there was a narrow timeframe after deployment that some Shifts reported an error within the foreach
loop over third-party packages.
Apparently I was not updating the package cache after deployment. So Shift was either loading stale package versions or none at all.
I considered updating my deploy script. But I actually don't want to update the cache on every deploy. Only when I update the vendor
folder, i.e. by running composer update
.
Enter Composer scripts. Specifically, the post-update-cmd
event.
Much like how Laravel uses this to republish package assets, I decided to use it to refresh the cache.
"scripts": { "post-update-cmd": [ "@php scripts/download-registry-data.php" ]}
It always felt a bit weird to have Composer run scripts. Like, "That's not Composer's job."
However, Composer is the tool I'm using and it governs when this script should run. So it really is the perfect place. 🔥