Laravel 12.23, weekly updates, and weekly tip
Laravel 12.23
There were no releases the last few weeks, but 4 in the last 5 days. This brings us to Laravel 12.23.1. Here are lots of highlights.
- Make
Pipeline
macroable in #56567 - Introduce deferred Events in #56556
- Allow passing multiple strings to
Str::deduplicate()
in #56548 - Ability to explicitly exclude factory relationships in #56396
- Add
Arr::some()
andArr::every()
in #56526 - Add
except()
to Eloquent Builder in #56442 - Add
to_action()
helper in #56496 - Introduce
#[Boot]
and#[Initialize]
attributes in #56518 - Add
actingAsGuest
method for clearing authenticated user in #56517 - Add
doesntContain
validation rule in #56467 - Introduce
#[Bind]
attribute in #56383
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
It's been a while. In the last few weeks I attended Laracon US, then we took our final summer vacation. Taking time off is always good. But doing so right after Laracon turned out well.
I had so many people ask me how AI affects Shift. My quick answer was, it doesn't. The models are not trained on upgrading Laravel. At least not the specific changeset.
Part of the Laracon US keynote was demoing Laravel Boost. A new tool which provides a set of rules and MCP servers that will boost AI's accuracy when working with Laravel applications. But even Ashley admitted AI's not very accurate. And definitely not very deterministic.
The longer answer is AI currently does not beat the speedy, curated upgrades Shift provides. Even the Upgrade Guide doesn't cover as much as Shift does these days. That's not to be braggy or salesy. It's more that upgrading Laravel has been my job for the last 10 years. I've researched and developed upgrade paths since Laravel 4.2. I've answered thousands of support emails to learn the edge cases.
So, does AI affect Shift? No.
Can you use AI to upgrade a Laravel application? Sure. But the developers who want to spend an hour prompting AI to do so probably weren't using Shift anyway.
This was all my initial reaction. But as I was asked more and more, and reflected on vacation, I think there may need to be a slight shift in my answer (pun).
What we're really asking about here is the future of Shift. While I don't think AI is an immediate threat, it may be one long-term. Thinking about immediate threats, what may have the biggest impact are the "optional" upgrades. Laravel 11 didn't require the structural changes. Laravel 12 touted "no breaking changes". What happens if Laravel 13 also has no breaking changes? What if there isn't a Laravel 13?
That's the real question. And an answer has already been on my mind. Anyone who reads this newsletter knows Laravel releases new features on a weekly basis. Historically, these were saved and bundled within a biannual release. Now, features are made to be non-breaking so they may be released immediately. This is great. But really it means there are more changes between Laravel 12.0 and 12.23 than there were between Laravel 5.6 and 5.7.
Now I do go back and add some of these to their respective Shift. For example, I've added more PHP attribute conversions to the Laravel 12.x Shift. But that doesn't really help the people who already ran the Laravel 12.x Shift. So, I also add these as a task within the Shift Workbench. But, as I've mentioned before, the Workbench doesn't get a lot of use. For subscribers, I help by sending them a mid-Shift. This is normally midway through the year when these changes reach a critical mass. Basically mimicking the old biannual release cycle.
So many ifs. So many buts. There's a gap here. It's too passive. It requires devs to know about the change and which tool to use. Everything is in place to just send Shift customers a PR with an atomic change adopting a new feature. I'm already curating the weekly changes. I'm already writing the automation for the recent upgrade Shift or Workbench. Instead of hoping savvy customers stumble upon it, just send it.
For example, a PR refactoring your code to use the new #[Bind]
, #[Boot]
, and #[Initialize]
attributes recently added. You want to adopt it, merge it. You don't, close it. No biggie. But it's effortless. It's automated. It's educational. All of which aligns with Shift's goal - keeping your Laravel applications up-to-date.
Anyway, </rant>
. This is what I'll be working on with the rest of the month. This won't change any of Shift's current offerings. There will still be a Laravel 13.x Shift. I'll continue to modernize the Laravel 12.x Shift. Any atomic changes will still be available in the Workbench. But these new micro-Shifts may help keep Shift in your automation toolbox.
Weekly Tip
A sub-point in all of this is to use AI in moderation. As developers we must be aware and familiar with AI as a tool. But also as developers we need to recognize it as the new shiny. Sometimes, maybe even most of the time, doing it the way you already know how might still be best.