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
whereBinary()to the query builder in #61261 - Introduce a
Cloudfacade in #61275 - 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 did a bit more work on Double. Mainly merging some PRs to expand integration beyond PHPUnit. Apparently the contributor is working on new PHP testing framework called Testo. I'm also reading the docs pages, refining them to be a bit more human.
I had a quick Human Shift come in to upgrade from Laravel 7. Took about 5 hours. We'll use the remaining time to backfill some tests. I'm finding with my inside knowledge of Shift and the AI skills upgrades are taking much less time. Upgrading 6 versions would have taken 10 hours a few years ago. Now its half that.
To that point, I'm toying with an idea for some kind of MCP server. Something around the knowledge I've acquired over the years of Human Shifts. Combining that with Laravel conventions, Workbench tasks, and Boost. It's still taking shape. But big idea is a sort of AI-JMac pair.
Weekly Tip
I was reminded from a tweet (which I now can not find) of the new type-safe helpers on the Config facade. Similar to request data, it allows you to get typed values. All of the PHP scalar types are covered (integer, float, boolean, array), as well as collection.
However, unlike the request data methods, this is not so much a cast as it is a verification. Underneath, these call data_get(), then assert the resolved value's
PHP type using the is_*() PHP functions. If the check fails, it throws InvalidArgumentException.
For example:
Config::integer('mail.mailers.smtp.port'); // int(2525)Config::boolean('unknown.value'); // InvalidArgumentExceptionConfig::boolean('unknown.value', false); // falseConfig::boolean('unknown.value', 0); // InvalidArgumentExceptionConfig::integer('unknown.value', 0); // int(0)
For the common case, this works as expected. But has some unexpected boundaries. Specifically an incorrectly typed value or default throws an exception.