Laravel 8.27, weekly updates, and 🔥 tip
Laravel 8.27
Few new features this week, so we get a minor version bump to 8.27.0.
- Fix Eager loading partially nullable
morphTo
relations in #36129 - Fix parallel testing when a database is configured using URLs in #36204
- Fix
sole
for relationship in #36200 - Don't pluralize string if ends with none alphanumeric character in #36137
- Allow components to use custom attribute bag in #36186
- Set process timeout to null for load mysql schema into database in #36126
- Conditionally merge classes into a Blade Component attribute bag in #36131
- Add query builder
chunkMap
to Query Builder in 68b35ca
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
Last week I finished recording and editing the Shift videos. Took a bit longer to record than I expected. Especially because the house is no longer as quiet as it used to be. 😅
There's still one left I want to do for upgrading older Laravel applications. Basically a condensed version of the live stream I did a few months ago.
Another reason these videos took longer was because I had a bit more to finalize with the design. Including some new logos and icons from Caneco. These are now live, with a few more fun tweaks to come...
I also continued refactoring some of the underlying Shift codebase. Now that Jess and I are pairing on it, a fresh set of eyes helps reveal the inconsistent or awkward pieces of code.
Since there's not a new Laravel version in March, I have some time to slow down and refactor. Plus, Jess and I are creating Tailwind Shifts. I'm not sure how many applications still use the 0.x or 1.x versions, but it will be good to set of Shifts that go all the way back to the beginning.
🔥 Tip
For the tip this week I am going to reshare my tweet from yesterday. This was a reminder the find
method accepts an array of primary keys, and returns a collection of matching Eloquent models.
1Video::find([1, 3, 5]);
In the thread for this tweet a few additional methods were mentioned like findMany
, which is arguably more expressive, and firstWhere
which I need to use more.
So instead of writing a bunch of where
causes, there's a few 🔥 Eloquent methods to streamline your code.