Laravel 13.27, weekly updates and tip
Laravel 13.27
This week brings us to Laravel 13.27. Here are the highlights:
- Add
refreshForUpdate()method to Eloquent models in #61247 - Add MariaDB support for vector distance queries in #61250
- Add missing test coverage for
StrandStringablein #61260 - Add
whereBinary()to the query builder in #61261 - Introduce
InteractsWithTestCaseLifecycle::flushState()in #61288 - Add
QueuetotalXSizemethods in #61231 - Add
stop()andensureNotTimedOut()toFakeInvokedProcessin #61266 - Introduce a
Cloudfacade in #61275 - Add Postgres keepalive DSN options in #61307
- Allow masking query bindings in exception messages in #61326
You may review the full branch diff on GitHub for a complete list of changes.
Weekly Journal
Last week I continued to work on Double. I mostly keep the buzz going as best I could on X with a few posts. I also merged a few PRs that came in, including a few of my own.
The goal with Double is adoption. I'd love to see it used by the PHP community, but also get incorporated into other projects. For example, seeing Pest recommend it. Or maybe, eventually, what Laravel includes.
Being on this testing kick, I'm reminded how important having a good test suite really is. I've believed this before AI, but honestly, it's more important now with AI. I'm at a place where I barely review the code. I'm comfortable doing that because I know I have a robust test suite.
Backfilling tests is a time consuming process. I jump start it with the Tests Generator. It stubs out a lot. You still need to "fill in a few blanks", as well as increase coverage with "sad path" tests. But that kind of work is perfect for AI.
I recently crafted both the Tests Generator and a skill to automate even more of this. I'm offering it as a new Human Shift to a "Backfill Test Suite". So, if you don't have a test suite, and don't want to waste your team capacity (or tokens) backfilling one, I'm here to help.
Weekly Tip
Povilas had a few good PHP tips last week. I'll re-share two I learned.
First, array_is_list() to check if an array is a "list" - an numerically keyed array, in order from 0. I remember way back from my ColdFusion days "lists" were a primary data type.
Second, was the "secret" third parameter to round(). It accepts a flag to set the "round mode" - what to do when the value is at the half point (i.e. .5). Round up (default), round down, round even, round odd.