Laravel 13 Release

Laravel 13.0.0

Laravel 13 was officially tagged about an hour ago. While Laravel 13 does have a few new features and fixes, it is another major release touting "no breaking changes". There are, nonetheless, changes and a few gotchas noted in the Upgrade Guide.

For the past several releases, Shift's goal has been more obvious. That is to make your application look and feel like it has always been running Laravel 13. Shift has always gone above and beyond the Upgrade Guide. Automating more changes like syncing config file, adopting latest conventions, and bumping popular community dependencies.

So, instead of a weekly update, allow me to highlight some of the additional automation in the Laravel 13.x Shift.

Refactoring request access

Laravel deprecated using get() for request access. This was actually delegating to the underlying Symfony Request class. Which Symfony also deprecated. So it's shouldn't be used either way. The preferred alternative is input(). Shift will automatically refactor calls to get() to input().

Adopting PHP Attributes

One of the biggest new features in Laravel 13 are the new PHP attributes. Late in version 11, Laravel embraced PHP attributes. Now with 13, they seem to be the preferred convention for setting Laravel class properties.

As such the Laravel 13.x Shift automates the conversion of simple class properties to their new PHP attributes. This includes things like custom model table names, console command names, controller middleware, and about a dozen others.

However, as noted in a previous newsletter, Shift does not convert a few instances. The notable examples are more complex property values, such as model fillable arrays, or closure based middleware. You are, of course, welcome to convert those if you like (more below).

Integration with AI

As I've shared a few times now, I don't want to compete with AI. If that is your tool of choice and you trust it to do a thorough job with your Laravel upgrades, use it. Laravel has embraced AI and offers several tools to integrate AI into your Laravel development.

I too, want to embrace AI. Again, Shifts value comes from its higher goal and deterministic nature. So whenever Shift can't reliably automate something, it leaves a detailed comment. I've always viewed this as a bit of a failure.

While I attempt to put as much detail and guidance in these comments, it's still a manual step you need to do. I think this is the perfect opportunity to give that to AI. Now, any of these comments where you may need to perform additional steps, I include a curated prompt you may paste into your AI of choice. For example, adopting more PHP attributes.

I think this is a great collaboration. It uses both tools for what they're best at, and you to continue automating the upgrade process.


As always, don't hesitate to send me any feedback.

Start Shifting!

View Archives →