Laravel 13.7, weekly updates and tip
Laravel 13.7
This week brings us to Laravel 13.7. Here are the highlights:
- Allow jobs to react to worker signals in #59833
- Implement
CanFlushLocksonNullStoreandMemoizedStorein #59850 - Introduce
WorkerInterruptedevent in #59848 - Add
@fontsand Vite font optimization runtime in #59584 - Allow passing arrays for
assertSoftDeletedandassertNotSoftDeletedin #59796 - Add
isLockedtoLockin #59791 - Fix route registration for domain-scoped routes in #59793
- Add bulk JSON path assertions in #59829
You may review the full branch diff on GitHub for a complete list of changes.
Weekly Journal
I didn't get much done last week. I had a general malaise. I think it was a combination of actually being sick, lack of sleep, but also just that AI coding fatigue I've been talking about.
May and December are slow times of year. It's after the Laravel release craze, but before Laracon. Also a few holidays. I don't have anything that needs my immediate attention. So I tend to be a bit aimless.
All this is to say, I'd love to work with you! If you have an old Laravel app you want upgraded, want to get into testing, or just pair to level-up your skills please reach out. I have the time and the talent. You may check my Human Shifts for hourly ideas or email me to discuss something larger.
Weekly Tip
I ran into something interesting when upgrading laravelshift.com. I was testing the tries property on a job. However, after Shift refactored to the new PHP attributes, this assertion failed.
Underneath, many of the attributes set the internal class property. But not all attributes are backed by an underlying property. In this case, tries.
There wasn't an immediate getter method on the underlying job either. The only method was within the Queue class. That was awkward to access and made me feel like I was testing the framework.
In the end, I changed it from an attribute to a method. When determining tries, Laravel prioritizes the method over an attribute or property. So I knew this worked. Plus, this particular job already had a backoff() method. So adding tries() was symmetrical.
Generally, I would just use the attribute. But it was important for this specific job to verify its retries and backoff. So, this worked. But I wonder with all these PHP attributes if a test assertion should exist.