Laravel 9.48, weekly updates, and 🔥 tip
Laravel 9.48
Several new features this week brings us to Laravel 9.48. Here are the highlights:
- Add
withBasicAuth
to HTTP tests in #45615 - Improve SQLite missing database error message in #45626
- Add
fragments()
andfragmentsIf()
to view response in #45669 - Add
incrementEach
to query builder in #45577 - Add ability to drop an index when modifying a column in #45513
- Allow to set HTTP client for mailers in #45684
- Add
notFound
to Http Client response in #45681
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
Unfortunately Izzy got way worse shortly after sending this newsletter last week. By the end of the day she was in the hospital. I stayed with her all week. We came home Saturday night and she is on the mend.
Needless to say, I didn't get much done last week. What little time I had while she slept, I did my best to answer support emails and keep up on the recent Human Shifts.
This week, I am playing catch up. I'll also retry my live stream tomorrow to submit some last minute changes for Laravel 10.
🔥 Tip
I did start working on the Laravel 10.x Shift. I actually like starting with the hardest change. In this case, adding types to all the core methods.
In the process of writing a method which returned a tuple, I learned something. Here's the snippet for reference:
[$name, $type] = $this->determineMethodChange($block);
In some cases, there is no need to change the method. For example, if there is already a return type. Initially, I returned an empty array from determineMethodChange
. While this does set $name
and $type
to null
, it also emits a PHP warning due to the missing elements.
Turns out, returning null
, instead of []
avoids the warning and sets the deconstructed variables to null
.