Laravel 13 Release: Embracing PHP 8.3 and the Era of Native Attributes
Published:
•
Duration: 5:57
0:00
0:00
Transcript
Host: Alex Chan
Guest: Marcus Thorne (Senior Software Architect and Laravel Contributor)
Host: Hey everyone, welcome back to Allur, your go-to space for everything PHP, Laravel, and the broader world of mobile and web dev. I’m your host, Alex Chan.
Host: I am so excited to welcome Marcus Thorne to the show. Marcus is a Senior Software Architect and a frequent contributor to the Laravel core and various ecosystem packages. Marcus, thanks for hopping on Allur!
Guest: Thanks for having me, Alex! It’s an exciting—if a little busy—time to be in the PHP world.
Host: It really is! So, let's dive right in. The big news is obviously that PHP 8.3 requirement for Laravel 13. My first thought was, "Wow, they’re really cutting ties with 8.2 already." From an architectural standpoint, why is this "version gate" so important for the framework right now?
Guest: Yeah, it’s a bold move, right? But honestly, it’s a relief for those of us working on the core and large-scale packages. By mandating PHP 8.3, the Laravel team can finally strip away what I call "the baggage." You know, those endless `if (PHP_VERSION_ID >= ...)` checks and polyfills that have been sitting in the codebase to support older environments.
Host: Oh, I can imagine. It’s like cleaning out a garage you haven't touched in five years.
Guest: Exactly! And it’s not just about cleaning; it’s about the toys we get to play with. With 8.3, we get typed class constants. Before this, constants were basically a "type-free" zone. You’d just hope no one assigned a string where an integer should be. Now, Laravel 13 can enforce strict typing on configuration values natively. Plus, we get things like `json_validate`.
Host: Wait, tell me about that. I saw that in the release notes—`json_validate`?
Guest: It’s a game changer for performance. Previously, if you wanted to check if a string was valid JSON, you’d usually run `json_decode` and see if it returned null. But that actually decodes the whole string into memory! `json_validate` just checks the validity without the memory overhead. When you’re handling thousands of requests a second, that adds up.
Host: That’s a huge "aha" moment for me. It’s the little things that make the framework feel snappier. But okay, let's talk about the *big* change. The one that’s going to change how our models look. Attributes. We’re moving away from protected properties like `protected $fillable`. Why the shift?
Guest: This is the "Era of Native Attributes." For years, Eloquent models have used these protected arrays. While they work, they’re basically "black boxes" to the PHP engine. PHP doesn't really *know* what’s inside `$fillable` until the code is actually running. By switching to Attributes—you know, using the `#` or `#` syntax directly above the property—we’re moving from imperative to declarative.
Host: So, instead of telling the model "here is a list of things you can fill," we’re literally tagging the property itself?
Guest: Precisely. And the beauty of this is how it interacts with your IDE and static analysis tools like PHPStan. Right now, those tools sometimes struggle to "see" what’s happening in a model without a lot of extra plugins. With Attributes, the metadata is right there. The IDE can see it through reflection without even executing the code. It makes the developer experience so much smoother.
Host: I actually tried a beta snippet of this the other day, and seeing `#` right on top of a Job class instead of a method inside it... it just felt so much cleaner. But, Marcus, I have to ask—is this going to be a nightmare to migrate? I have models with forty or fifty fields. Thinking about changing all those to Attributes makes my head spin a little!
Guest: (Laughs) You’re not alone there! That’s the "real struggle" part of this release. But there’s good news. First, Laravel 13 is keeping a backward compatibility layer. Your old `$fillable` arrays will still work... for now. But the community is clearly moving this way. My big tip? Laravel Shift. Taylor and the team are already working on "Shifts" that will automatically refactor your property arrays into Attributes.
Host: Oh, thank goodness for Shift. It’s saved my skin more than once.
Guest: Right? But there's a deeper point here. This release is a "spring cleaning" for the API. They’re purging deprecated methods from Laravel 10 and 11. So, if you’ve been ignoring those "deprecated" warnings in your logs, March 2026 is when the bill comes due.
Host: (Laughs) Consider us warned! So, if I’m a developer listening to this right now—maybe I’m running a Laravel 10 app on PHP 8.1—what should my roadmap look like for the next year?
Guest: Start with the engine. Don't wait for the Laravel 13 release date to jump to PHP 8.3. Get your dev environment and your CI/CD pipelines on 8.3 *now*. It’s generally a very smooth transition from 8.2 to 8.3, but you want to find those edge cases early. Once you’re on 8.3, start auditing your high-traffic models. You don't have to do them all at once, but maybe try the Attribute syntax on your next new feature. See how it feels.
Host: That’s great advice. And I suppose we should also be looking at our testing suites, right?
Guest: Definitely. Since the underlying reflection logic for how Eloquent reads metadata is changing, if you have any low-level framework overrides or custom model extensions, your unit tests are going to be your best friend.
Host: Interesting! It really sounds like Laravel 13 is about maturing. It’s less about "hey look at this shiny new toy" and more about "let's make this the most professional, high-performance version of PHP we can possibly build."
Guest: That’s exactly it, Alex. It’s architectural refinement. It’s Laravel growing up and fully embracing the modern power of the PHP engine.
Host: Marcus, this has been so enlightening. I’m actually really excited to start refactoring some of my older Jobs into this new declarative style. Where can our listeners find you if they want to follow your work or see your contributions?
Guest: You can find me on X—or Twitter, I guess—at @mthorne_dev, and I’m pretty active on GitHub. I’ll be posting a lot of "before and after" code snippets for Laravel 13 as we get closer to the date!
Host: Awesome. Thank you so much for joining us!
Guest: My pleasure!
Host: And thanks to all of you for tuning in to Allur. The big takeaway today: start your engine! Get on PHP 8.3, embrace the Attributes, and let’s get ready for a cleaner, faster Laravel in 2026. If you enjoyed this episode, please subscribe and leave us a review—it really helps the show. I’m Alex Chan, and we’ll catch you in the next one!