This is the Laravel News Podcast, your one-stop podcast to find out about
Laravel-related news, tutorials, packages, and more. Here are your hosts, Jake
Bennett and Michael Dyrynda.
There it is.
For those of you who happen to be watching online, Mr. Dyrynda is currently holding
up
a little elephant that is... He's got a name. Is it Bruno?
Bruce.
Bruce. Bruce the Elephant. If you've never been to Laravel Australia before,
you may not know who Bruce is. Bruce is the official mascot of Laravel Australia,
and Michael has recently commissioned an LED sign
of said Bruce, as well as the upcoming theme of Laracon AU this year. So, pretty
freaking awesome. If you're not watching on- online, you should- you should check
it out, 'cause it looks really, really darn cool. Michael, tell us a little bit
about this thing.
Yeah, I had- I had this... When we- when we started putting the branding together
for this year, it was... We- we landed on this notion of Level Up, and it- and it
came together in a really, I think, clever way, which maybe is a- is a discussion
-for another podcast, but... -Okay, sure.
When I saw the final version of this Level Up logo, or this, uh...
-What do they call it? This l- lock up. -Mm-hmm.
'Cause we've got a couple of different- we've got a couple of different lock ups
for the Level Up logo, but this particular one, which is a- which is a square where
Bruce actually jumps up the ladder
of the- of the level.
I thought that's- that'd look really cool as a sign, and so I- I found a place on
Etsy
that manufactures these LED signs, and I just got it in- I just got the delivery
yesterday, so. I haven't quite figured out how to... There's- if- if you're watching
the video, you can see there's, like, a piece of paper on my wall here that-
-Mm-hmm. -Which is the template for where I need to
put it on the wall, but I have no idea as yet how I'm going to mount it, how I'm
going to wire it up. Because each- each of the 15 pieces of the-
of the logo are individually wired with LEDs. I've got to figure out how to kind
of connect it all up, uh, and- and get it on the wall without,
um, damaging the sign, the wall, or burning my house down. So, wish me luck.
If you've- if you've had any experience in- in wiring these things up, uh, reach
out to me. If you can help, that'd be great.
Absolutely. It's gonna look awesome though. I'm confident.
It definitely seems like a good... All right. It's gonna look great. Like, just-
just seeing it, just the- the one piece there. Um, maybe I'll share it on- on
-Twitter. But... -Absolutely. I said if there's anybody I
know who could do it, it would be Michael Dorinda.
-We'll figure it out. -Michael can figure it out.
It definitely feels like a weekend project, though.
Yes. Yeah, yeah. It's gonna take a little bit of time. Little bit of time. Well,
episode 241 is what we're on, folks. Thanks for joining us. July 14th, 2025 is
the date. We've got some releases, some news, some packages. All sorts of good
tutorials, and they're coming your way right now. Here we go. Episode 241,
Releases, Laravel version 12.20. So, Laravel team released this, with the
ability to fail while throttling ...
For a context remember method, the ability to customize the collection pluck with
the callback, and more. So let's start with that remember context. Ben Askew
contributed context remember, and remember hidden functions, which will add the
result of the provided closure to the context, if not already present, and
always return the result. So before, what you'd have to do is you'd have to check to
see if context... And context, again, is something we've talked about on this show
for quite some time. Uh, but context is a Laravel class that you can now use, that
will maintain the context of the, uh, request. So you can say, "Add this to the
context," it will persist for the lifecycle of that request. And so, what
you used to have to do is context has, and you check to see if a key existed, and
then if it didn't, then you would have... Sorry, actually, let's- let's take the...
Let's- let's dig in a bit here. If it did have that, then you'd have to retrieve it.
Otherwise, you'd have to go set it and then return it, right? And so, that's-
that's kind of what it was. It was- it was not friendly. And so with this, you can
now say, "Context remember," you can pass in the key, then you can pass in a
closure, which will either return the value of that key, or will set it using
the result of that closure. So it's really much nicer. Thanks, Ben, for writing that
one up.
Balboa codes contribute doesn'tStartWith and doesn'tEndWith string methods to the
stringable classes, which are the opposite, of course, of startsWith and
endsWith. You can compare the value against another string or an array of
strings. It does exactly what it says. Doesn'tStartWith, doesn'tEndWith, nice and
simple there.
Adding the failWhen method to the ThrottlesExceptionQueueMiddleware. Michael
Dza Jha... Oh boy, hmm.
-Michael Japeridze. -Ooh, man. Japeridze. Did you paste that
into, like, some sort of... Nope.
That's a really good one. That's a really good one. Congra- congratulations.
-It's good. -Contributed a failWhen method to the
ThrottlesExceptionMiddleware. So currently, this middleware
only allows for deleting the job when a specific exception is thrown.
There are occasions where you would want to mark the job as failed instead. For
instance, in the context of a job chain, it may be desirable to fail a job when an
exception is thrown so that the chain stops executing rather than deleting the
job from the chain there. So an example is given, you have this middleware. Throttle
the exceptions, delete when a-... fail when, and so you can now do either one of
those, uh, so that's really nice. Pull request 56180 for details if you need.
Additionally, the q- the queue documentation also provides more
information on using that throttles exception middleware, which is really
handy for these jobs.
Uh, Punyabul Sha contributed a new fake method to the queue facade that allows the
same pattern used by the event facade. So before, you'd have to queue fake, and
then afterward, you'd have to do some manual cleanup that was required. Now you
can do queue fake for, and then you can pass in a closure there. The original
queue is automatically restored once that's done. So it only fakes for that
particular instance and then, uh, allows you to do selective job faking there. It
also allows your critical jobs to be queued normally while you're faking the
others. So, really nice, uh, really nice addition there.
Adding JSON serializable interface to the URI class. Uh, Diva Marelis added the
JSON serializable interface to the URI class to make sure that it's properly
converted to JSON when you're serializing that.
We've got the fluent class being made iterable now. So this is, uh, this is
introducing the iter- iterable contract to the fluent class, which addresses a small
paper cut when using fluent with loops. So right now, you need to call toarray in
order to iterate over that. Now the settings property is iterable in Laravel
12.20, so you don't have to do that toarray before iterating over that
anymore.
The collection method was added to the config repository. So Kennedy Tedesco
contributed a collection method to return a collection instance from the config
repository. So now you can say config.dodop.collection and then pass
in the period-separated or the,
um... This is, this is what's used inside of Laravel when you're needing to sort of-
Yeah
-... dig into- -The dot notation
... dot notation. Thank you. That's what I was searching for. Previously, you would
have to collect the config array. Now you can just do config collection-
-Mm-hmm -... and it will grab out a collection for
-you. -Yeah, I've done that a few times. This is
nice.
-That's super nice. -These, these paper cuts, these little
things that when you see it, when someone submits the pull request and adds it to
-the framework, you go, "Yeah, of course." -Of course.
How have, how have I been living without this? Because the amount of times that
I've done collect config, you know, in, in my time, it's, uh,
just if... I don't know. If you ever repeat these things, just submit a pull
request.
Well, it is great too because, like, if you're using configs in any sort of way
that's more than just pulling a single value from the config, there's many, many,
many times where you're gonna need to pull it into some sort of collection so
you can iterate over and work with those values or pull a specific piece out by
-name- -Yeah
... or, uh, or you know, do some sort of operations on them rather than just
referencing them as static values. So, um, had to do this a couple times myself, so
this is really nice. Adding closure support to the collection pluck method.
Ralph J. Smith contributed an update to the pluck method that allows
customizations to the keys and the values that are being returned from that pluck.
Sounds, uh... Does just like what it sounds like. You get that pluck passing a
closure, then you can return, uh, whatever you like from that. Um, so there you have
that. Context blade directive, Martin Bean contributed a context blade directive
to determine if a context value exists inside of a blade file, of course. So
context canonical if it is. So it's like a conditional set up, so instead of if
context has the word canonical, then do this. Nope, no longer needed. You just
specify @context in your blade file, and if the key that you pass in there exists,
the following portion will then render. Really nice there. Pull request 56146. Of
course, you can see all of the changes and fixes inside of the release notes for
1219 and 1220 on GitHub.
-There you have it. -Just a... Just on that context one, does
that also then inject
a value? It does. Very cool.
-So not only does it- -Hmm. That was nice
... provide you that conditional check, it will
provide the value of that context parameter in the value
-variable. -Yeah.
So the dollar value will be whatever it is the context get of that key. So that is,
that is smart thinking, Martin. Like that one.
Very nice.
On to the news. JetBrains PHPverse 2025 happened a few weeks ago
to commemorate, to celebrate the 30th anniversary or the 30th birthday of PHP,
which brought together core contributors, framework authors, and passionate
community members for a one day event packed with insightful talks. From long
time maintainers to new faces in internals, the event served as both a
reflection on PHP's evolution and a glimpse of what's coming next. It was
streamed online and peaked at 4,000 simultaneous watchers live from all over
the world, and now all the talks have been published, so it's the perfect time to
revisit the key moments and catch up with any of the talks that you might have
missed. So it talks about FrankenPHP, which is now a official part of the PHP
project. It is, uh, used as like a, a driver, I think is the, the terminology
for something like Laravel Octane.
Talked about 20 years of Symfony, uh, MCP in PHP, how AI is changing the tech
industry. There was a Q&A with our very own Taylor Otwell, the fu- future of PHP
education, growing PHP for the future, and so on. So we'll have links to all of that
for you in the show notes. There's also some cool PHPverse swag, and no event, of
course, is complete without awesome swag, and
the JetBrains team went above and beyond. Each attendee received a bag filled with
PhpStormStorm shirts and hoodies, a mouse pad, a, an elephant, uh, a PHP elephant
Lego, and more. Uh, some of the items are available on the swag store. I had a look
earlier. There is T-shirts. There is a hoodie. Um, and there are some pins and
stickers as well, so check that out, uh, if you wanna get involved in any of that
stuff. So, uh, links to all that in the show notes.
Love the Lego PHP elephant. Pretty exclusive stuff there.
-Mm-hmm. -I have a feeling there's gonna be quite a
few people scrambling to get their hands on that one. Really, really cool stuff.
Thanks so much, JetBrains, for putting that together. Uh, great, great work on
that.All right. Laravel in 2025. So as crazy as it sounds,
July 2nd was the midpoint of this year, which means we're more than halfway
through the year. Yikes. So the team here at Laravel News thought it'd be nice to
recap some of the most memorable moments so far at Laravel News. So the following
posts that we're gonna talk about are a mix of some of our most popular posts,
community milestones, as well as products and events that have happened. So let's
start with Laravel 12. We used to have Laracon Online, which is where we would do
some of these bigger announcements, but then some of these, now that we don't have
Laracon Online, are just taking place on Bluesky and on X, right? So Laravel 12 was
released on February 2024, uh, of this year. So, uh, sorry. I said 2024. February
24th of 2025, my apologies. Um, there was also the new starter kits that were
launched with that, with the first-party starter kits. The Laravel Installer also
now supports these custom starter kits, which is really neat. If you have not yet
seen that or read about that, we have that in a blog post. Uh, you should check this
one out. The custom starter kits are really, really powerful. It used to be,
um, a lot more difficult to do this, but now you can install Laravel using these
custom starter kits. It's a great way to get apps up and running, um, really
quickly using your custom configuration. Uh, Laravel 12 was also insanely easy to
upgrade compared to previous versions of Laravel. So it used to be that it was, you
know, quite a few steps you'd have to take between, uh, versions. Laravel 12 was
by far the easiest. Now I still happened to use Laravel Shift for all the ones that
we moved from 11 to 12. Just a couple little pieces and, and parts that are
really nice to just have Laravel Shift to take care of for you, but by and large, it
was basically a composer.json update and that was about it. It was really, really
-good. -Mm-hmm.
It also leverages Inertia 2.0 for the Vue and React Starter Kits. If you did have
Nova running, you were gonna have to... I- if it was on a older version, you were
gonna have to upgrade that as well. So again, that is one other thing to be aware
of, uh, when you're, uh, shifting.
The Laravel Shift will help take care of for you as well. Uh, but great upgrade
there. The path from 11 to 12 was amazing, so great job to the Laravel team on that
front. Laravel Cloud was also released in February along with the Laravel 12
release. This is, of course, a fully managed infrastructure platform and the
fastest way to deploy and scale your Laravel applications. Lots of beta testers
helped to contribute to making this what it is today. And of course, the team has
done an amazing job on making the UI feel absolutely amazingly buttery smooth. I- I
literally can't
think of a better way to describe it. It just feels so good to use, and so great
job to the team on that one. Know lots and lots of time was poured into making that
what it is today, and if you haven't checked it out, you definitely should.
Native PHP Mobile version 1 launched on May 2nd, which brings your Laravel app to
the iOS and Android device stores. There's been, you know, lots of years that we've
been developing web applications that we can launch onto the web using Laravel.
Amazing. But you can now use that same language and that same set of things that
you've learned to build apps that you can bring to the App Store and to the Google
Play Store with Native PHP for Mobile v1. So huge release on that front, um, and,
uh, really excited to see what people are building, uh, with this new, um, library.
Okay.
The big one here, Laravel Nightwatch, was also released. So I, in particular, am
more, was more excited about Nightwatch than I was about Cloud. I've got a lotta
stuff that I- I already have running inside of Forge that I've been really
happy with and have not needed necessarily to switch to Cloud, but Nightwatch is one
of those things that I could add to every single one of my projects. So it's a
first-party product with deep monitoring and insights for all of your Laravel
applications, no matter where you deploy them, and, uh, you can get started by,
like, checking out nightwatch.laravel.com. Really, really cool. Tailwind version 4
was released. Of course, the community has been largely behind Tailwind for a long
time. Adam Wathan, long-time Laravel community member, uh, who created
Tailwind, of course. And so on January 22nd, Tailwind version 4 was released with
a brand new high-performance engine, CSS First configuration, simplified
installation and more, which we have a release post that you can read about
there, um, in the blog post here. Of course, there's plenty more to come this
year. Uh, we've got Laracon US right around the corner from July 29th to 30th.
Hopefully, we'll see you there. Expected, uh, to announce some new updates to
Laravel Forge, which I'm really excited about. Livewire 4 was also mentioned to be
released, uh, hopefully at Laracon US 2025 live from the stage. We've got
Laravel Live Denmark coming up in August. We've got, uh, Laracon AU, of course,
November 13th to the 14th. Uh, an opportunity to learn and share and connect
with like-minded people, level up your skills, knowledge, and Laravel
applications. You can still grab tickets for that. And then, of course, November
20th of 2025 is when PHP 8.5 launches, so we're gonna talk about that a little bit
more in the show as well. That is our first half of the year. Looking forward to
the rest of the year. It's gonna be a good one.
Yeah. Lots, uh... A lot of big stuff happened in the, in the front half of this
year, so it's gonna be interesting to see
what the, uh, Laravel team in particular has been cooking up,
uh, in that time on top of... Obviously, they're much bigger now, so they have the
capacity to do a lot more things. Um, and, and as you say, Nightwatch and Cloud
launching in the, in the first half of this year, not, not small things by any
stretch. So to have the capacity to do that, to launch that, to maintain that,
and, you know, to look to the future as well. Taylor's got a two-hour keynote this
-year on the first day, so- -Yeah. Yeah. It's gonna be crazy.
Uh, looking forward to that. On- on that, the, the schedule for Laracon US is up now
as well, so if you hadn't seen that, uh, if you didn't see the email or if you
haven't seen online, check that out. Uh, there's a lot of cool stuff, interesting
talks on the horizon for that.Another one that I really enjoyed and immediately, uh,
upgraded was the ability to run Laravel Pint faster in parallel mode. So it was
recently updated with a new --parallel flag that makes Pint run 40 times faster
and will fully leverage the parallel capabilities of phpcs-fixer. You can use
it using /vendor/bin/pint --parallel. The flag is marked as e- experimental and is
potentially unstable, but to access this flag, all you need to do is update to the
latest version of Laravel Pint, uh, at least version 1.23.0.
Along with the --parallel flag, this also allows extending a Pint configuration from
another file. This is useful if you have an organization Pint config you share
across projects, however, want to tweak a few settings on a per project basis.
Um,
yeah. Big- big fan that being able to run and leverage multiple processes,
especially in things like CI to try and get those processes to run quicker, you
wanna get feedback in those cycles as quick as possible, so shout out to Nuno
and the Pint team for that one.
Awesome. Uh, speaking of NativePHP, which we just mentioned about the first half of
2025, uh, since they launched NativePHP for mobile in May, they've been building
fast and quiet, running, uh, and refining the core, creating better tooling,
expanding what was possible with it. So version 1.1 drops July 14th, which is
today, the date of this recording, and it isn't just like a collection of fixes.
It's really a foundation upgrade to make these apps easier to build, faster to
ship, and ready for real production work. So let's talk about a couple of the things
that have been brought to 1.1. First is modular
native APIs. Here's what we mean by that. Previous to this, everything was sort of
stuffed under this system class. We had system, uh, you know, double parens, and
then you could get to all these mod- these, uh, native APIs, like biometrics or
camera, dialogues, geolocations, things like that. No longer do you have to do
that. They all have their own dedicated facades, so you have biometrics under its
own namespace. Camera, dialogue, geolocation, haptics, push notifications,
secure storage, and then system. So each one is designed by itself to be
predictable, documented, and then easy to expand. So this sets the tone for all
future native features, pulling them into their own facades so they can be really
focused and testable rather than having them all crammed under one spot. There
also are a couple new features, secure storage, geolocation, and gallery picker.
So these are new native capabilities that you have access to. Secure storage allows
you to store tokens, secrets, and credentials using that device's native
keychain or keystore, which is incredibly powerful. Of course, geolocation is a big
one if you ever need accurate location data, so you can now ask for that in the
permissions support. It's cross-platform supported, which is excellent,
and then gallery picker is when you allow users to select media that they want your
app to be able to access. If you've ever used an application with modern, uh,
privacy focus, you know that it needs to gain permission to not... You know, it
used to be, "Do you give us access to all your photos?" And you had to say yes or
no, and now you can be more selective in which things you want to share. This
gallery picker is essentially that. So they're now fully integrated into Laravel,
no plugins, no separate workfl- flows, just these really powerful APIs that you
already understand.
ENV handling was also something that was annoying. Previously, in Android, if you
ever changed the ENV values, you had to run PHP artisan native_installforce. This
was a destructive step, so it wiped your entire project and required you to rerun
that native run. You don't have to do that anymore. They've now moved all that logic
into native_run。 So when you update that ENV, it changes the whole thing without
deleting anything. Uh, so fewer surprises, no wasted time. Uh, same as what it was
in iOS, that's now the same in Android now. Okay, couple of things that sound
less exciting, but they're actually allowing you to do some really cool stuff.
Full CLI flag support. So version 1.1 introduces this ability to allow you
to pass those flags to that native_run function, unlocking true automation. What
do we mean by that? You can now run these native PHP actions, uh, sorry, these
native PHPs, uh, functions in GitHub Actions in your deploy scripts or in your
staging pipelines so that you don't have to have prompts or manual steps built in
there. You just pass the flags, and it sort of does it silently for you. Really,
really nice.
Also, a undersold feature here, smaller, faster binaries. So in Android, they went
into their PHP build, and they cut it in half, essentially, from 16 megs down to 8
megs. Um, in Android with ICU, from 44 megs down to 35 megs, and in iOS, they cut
it in half as well, 55 megabytes down to 22 megabytes. So faster downloads, lighter
binaries, li- lighter bundles, and better performance. Uh, so really, really good
stuff there. Um, there are a couple other items, uh, including rewritten
documentation, uh, real testing infrastructure with unit tests and
end-to-end tests. Uh, there is a Kitchen Sink app that's now live on the Play f-
Play Store, so you can take a look at some of these features that we just talked
about, secure storage, geolocation, gallery picture- picker, uh, that you
could download and kinda check that out on your device to see how that feels, and
then, uh, you can, uh, take a look at the merch store that they've also launched,
which is shop.nativephp.com.
Whoo, bunch of stuff there, all available to you as of the time of this recording.
If you're using that, you should definitely upgrade. Uh, it's a good one.
Thanks so much to Shane Rosenthal and the team over there for writing this one up.
Next up, the Laravel Claude A-... code setup repo is a one command setup for
AI-powered Laravel development with Claude code and MCP servers. It will help you to
automatically configure all MC- MCP servers for the ultimate AI-powered
Laravel development experience with Figma integration. The Figma integration
features seems like they could be very powerful, helping you automatically create
views, extract design system, build components, and more.
Uh, main features include global MCP servers that are shared across all of your
projects, GitHub integration that accesses all your repositories to manage
PRs with automatic token configuration, a memory system to remember decisions across
projects, Context 7, which is the latest Laravel ph- which provides the latest
Laravel and PHP documentation access. There is web fetch for accessing external
APIs and resources, Figma integration to provide design-to-code workflows with
automatic design token extraction, automatic design token extraction ,
providing colors, typography, and spacing for Tailwind CSS, and a Laravel debug bar
providing real-time debugging if installed, and more. Uh, it's pretty
simple to get up and running. There is a curl command that you can run through
Bash, um, and then, uh, get everything up and running.
You can get started with the package by reading the readme and the docs folder,
which we'll have links to for you in the show notes.
Well, hey, folks. We talked about a little bit earlier that PHP 8.5 is getting
released in November 20th of this year, so the next couple items that we have here
are all related to Laravel, sorry, not Laravel, PHP 8.5. So, this first one is
written up by Paul Redmond, everyone's favorite human, really good, and he talks
about, he- he goes into quite a bit of depth on this. I'm just gonna skim the
surface on this one, and if you want to read the additional details of it, please
feel free to go and read it. But the- the
headline is this, array_first_ and array_last_ functions are being made
a reality inside of PHP 8.5. So,
this has had user land implementations and polyfills by Symfony, by Laravel, by
other things, uh, throughout, you know, forever, right? These- these
complement some things that were already pulled in in PHP 7.3, which were
array_key_first_ and array_key_last.
But again, without going into too much depth as far as how it works and how these
polyfill works, just know that array_first_ and array_last_ will now be
available to you natively inside of PHP 8.5 in November.
-Perfect. -There we go.
The pipe operator is also coming to PHP 8.5 when it will be released on November
20th. The operator is an exciting prospect for PHP developers wanting to chain
multiple callables together, passing a value through them from left to right in a
native way.
The pipe operator
accepts a single parameter callable on the right and passes the left side value to
it, evaluating to the callable's result. Now, if that doesn't make much sense to
you, any time you have used Laravel's collections and chained on a filter and
then a map and then a first- or whatever, this is a similar concept but supported
natively within PHP. So you can get a long way to do things like
running a string through HTML entities and then string split and then mapping to
uppercase things and then filter the values, all using native PHP functions.
Um, the p- performance benefits would- would be the main thing to do this, having
this functionality native. I wonder if any of the Laravel connection stuff, uh,
collection stuff can be adapted to maybe leverage this functionality under the
hood/behind the scenes. Uh, but it does mean that there will be situations where
you can sort of map and filter and reduce using the native pipe functionality in
situations where nec- you don't necessarily have to reach for the
collection functionality. So,
uh, definitely check that out. Uh, it will be released as part of PHP 8.5 in
November.
That is incredible, honestly. I- I just...
It feels like these things used to only be...
They only existed in some
parallel universe where PHP was willing to accept these sorts of things. And I feel
-like- -Mm-hmm
... in the last couple releases, like, the dam has broken and all of these amazing
new features are flooding in, and it just feels like it is such a wonderful time to
-be a PHP developer, doesn't it? I mean- -Yeah
... there's just so many cool features that we get. And not only that, but we
have the community keeping us updated, 'cause that was some of the other parts of
it too, is I feel like it used to be that Laravel... Oh sorry, not Laravel. PHP
-releases would kind of come and go- -Mm-hmm
... and nobody was really any the wiser as far as what the new features were. They
had, maybe there were some break/fix things stuff in there, but there was none
of these new sort of banner features that were coming out that people wanted to
upgrade to get. And this is one of those big ones, the pipe operator. That's so
cool. Now, the syntax is really interesting. I think it looks good, it's
-just gonna be weird to get used to. -Mm-hmm.
It's sort of... You know what I mean? I'll have to kind of go back and go, "What-"
-It's very uncharacteristic for PHP. -Yeah. Yeah, exactly. Like, what was that
-operator again? Pipe arrow? -Yeah.
-Okay. -Yeah.
Like that's just... You know, it's interesting. I- I think it's a good one,
-right? It's- -Yeah.
-You know? -I think it's borrowed from, like,-
-I think it's got to come with this- -.Dot Net or something like that.
-Okay. -Or- or C Sharp. So it's... Yeah, it's,
there's- there's an established... And a lot of the stuff that
PHP has been adding in recent times
does have
a history in other languages. And so it's- it's easier to kind of
have something familiar for people that move between languages, perhaps, when you
look at what's already out there before implementing. I think the- the- the big
thing is, well,
not so much, you know, not wanting to do things or not bringing things in because
Symfony had it or because P- uh, Laravel had it, or whatever else. I think the-
the- the main reason
is because the PHP Foundation exists now. That there is people that are actually
paid to develop and support PHP the language, and they're doing this in a full
time capacity. That there is now active community support...... to, you know,
enable people to work on this, not just in their free time, not, you know, whenever
they're, they're a- able to, but to do it in a full-time capacity. And that, I
think, has s- you know, moved a lot forward in terms of the ability for PHP to
manage releases, to communicate releases, to, to do more exciting things more often
and more regularly than, you know, what we had before. So shout out to everyone
that is involved in that.
Absolutely. Well, uh, along with all of this, you might be asking yourself too,
like, "How can I get started just testing out PHP 8.5? What's the easiest way for me
to do that?" Well, we're gonna talk about that a little bit here, but we're also
gonna talk about another feature that 8.5 introduces, which is a diff option
for the PHP INI flag. So
PHP-- INI previously would show you, hey, here are the values, um, that are loaded,
uh, as well as maybe showing you here's the path that you're loading it from. Um,
but this, uh, there's a couple cool new things here, um, that are, are going to be
available to us starting in 8.5. So
you can use this diff, uh, to show you the INI values that are different from the
built-in default values. So if you do PHP-- INI=diff and it says, "Here are all
the loaded values that were made to be different based on INI files that you were
loading in." And sometimes that's not always easy to identify either. Where are
my loading these INI files from? Am I loading multiple INI files? And so, uh,
Paul Redmond talks about how you can go through and get a little taste of this as
well as, uh, mess around a bit with being able to see not only what ones are
different, but where am I loading them in from? And so he talks about specifically
here using Docker. Now, Docker is one of those things some people don't really like
to get involved with it, and me being one of those, raise your hand. Um, but he
talks about how you can use Docker in order to be able to set up a new PHP 8.5
demo. And then he shows, here's how we can see what the INI values are before, and
then here's how we can see what it looks like after we load these, uh, INIs. And
then we can also see here are any loaded configuration files, which is gonna point
you to all the INIs that got loaded in order to produce that difference between
what the default values are and what your new values are. So if this is something
you'd like to play with before 8.5 was released, this is a great tutorial to go
through.
It's not a long one. We're talking about,
uh, 10-minute read here, right? From actually getting it, started reading it,
to actually getting through the end of it with a, a, a Docker 8.5 install. So should
be a good one. If that's something you'd like to play with, definitely check that
one out.
The last PHP 8.5 feature we have to talk about today is fatal error backtraces. In
PHP 8.5, a new fatal error backtraces setting can control whether a backtrace is
shown for fatal errors. Fatal errors without backtraces in today's stable PHP
versions, for example, 8.4, might include parse errors for syntax errors, duplicate
functions or classes, infinite loops, and, uh, max execution time and so on.
So if you run code in PHP 8.4, you'll get, uh, if you try to declare a class
multiple times, for example, you'll get a fatal error that says, "Cannot declare
class B because the name is already in use." And it will just tell you where that
error happened. Starting in PHP 8.5, you'll get more helpful information that
led to the fatal error. Clearly, this is derive, uh, this is a, a contrived
example, but it will tell you where
the duplication happened. It'll give you, uh, it'll tell you, this was previously
declared somewhere else, rather than just saying that it has already been declared.
So, uh, the ini setting default value is to show fatal error backtraces, meaning it
is enabled by default. But if for some reason you wanna turn it off, you can set
that setting to 0 and you'll get back the current state of affairs. Uh, we have
links to this and all of the PHP 8.5 updates in the show notes for you.
Okay. Moving on to packages. So this first one, I was confused when I read it for
the first time because it says Volt in the title.
-Mm-hmm. -Laravel performance testing with volt test
PHP. Now if you were naive like me and you think, oh, Laravel Volt, which was
introduced at, I think, like, Laracon 2023 US, I think, is where it was at? Um...
-It's been around a while. Yeah. -Somebody talked about this, right? Which
is, like, um, these, like, LiveWire components and, like, single, single file
component things. Not what we're talking about. No need to really continue down
that path. This is talking about volt test PHP, which, uh, if I'm reading its, in
its own title of what it claims to do, it empowers developers to write and execute
performance, load, and stress tests for their applications directly inside of PHP.
So what the Laravel performance testing package does is this allows you to
use the volt test PHP SDK to create these load tests for your Laravel applications,
uh, which some of the niceties that it sort of folds in here is things like route
discovery, CSRF handling, reporting, and more. So using the Laravel package, uh,
that we're talking about here, you can quickly get up to speed using that volt
test, generating test files easily, and starting to stress test your Laravel app
if that is in fact something you need to do. The API looks really nice. You
basically set up a scenario and you set up different steps that you'd like to test,
and then you can, uh, build it all out s- very... In, in a fluent interface, uh,
very similar to how you'd build out... uh, what you would do when inside of a PHP
unit sort of request life cycle. Here are the things I want you to do, and then you
can go through, filter it out only to particular, uh, tests that you want to
run, and then do your stress test there with PHP Artisan Volt Test and run that
there. So it's easily, uh, configurable, automatic route discovery, comprehensive
reporting, URL load testing. It comes with artisan commands, configurable, uh,
through flexible config options, and then it also has things like CSV data sources,
which you might think is, like, "W- why would I need to do that for?" Well, if
you're wanting to load a bunch of different data into these stress tests,
it's gonna require a large amount of it to kind of run through for realistic
performance testing. And so, a lot of times you're going to load that in through
some sort of CSV data source. It supports that. So you can check this one out in
the show notes.
Intelligent parsing and formatting of names in PHP apps. Uh, if you have ever
done anything that deals with a customer, you know, like a CRM type thing or
anywhere where you're displaying names of people, where it can be arbitrarily
entered into forms, Name of Person is a PHP package inspired by Basecamp's Name of
Person Ruby Gem, which gives you intelligent parsing and multiple
formatting options.
If you handle, uh, sorry, handle person names in your PHP applications with
elegant formatting options, transform names between multiple presentation
formats, the package provides a clean type safe way to parse, store, manipulate, and
display person names consistently across your application. So you can directly
instantiate a person name with a first and last name as separate parameters, or you
can use static constructors for, uh, you know, person name from full, and then you
can, from the parsed object, return the first and the last name. It handles single
names as well. So if you had, say, "prince,"
uh, you would get null back for the last name. The package also has Laravel support
for cars that you can use with your models, and the car support string based
cars configurations, as well as a fluent method and JSON serialization.
Multiple format options are available. There are nine different ways to display
names. There is full, familiar, abbreviated, initials, sorted, possessive,
and mentionable. There is smart parsing to intelligently handle full name strings
and edge cases. There is full international name support with proper
multi-byte handling. Core functionality means it works in any PHP project, and a
specific viral integration provides native eloquent casting for seamless database
integration. So he talks about, um, you know, familiar and initials and, uh,
possessive formatting options. So if you had, um, Eric L. Barnes, as he likes to
sh- pla- place his name around the internet. If you said that was his name,
then familiar would be Eric B., um, you know, with a, with a sh- Initial for the
surname. Uh, initials, you could say name initials to get E-L-B, to get the initials
of all of the names. Possessive for the first name, so Eric's, Eric apostrophe S,
and so on and so forth. Uh, this is useful, you know, if you're
sending emails to people, you might wanna address them in a-
-Hmm. Good point -... e- with a possessive. You might want
to, um, generate avatars if they haven't uploaded an image with, with the initials
for their name and so on and so forth. So definitely check this one out. Uh,
something that
we do in a number of different places, I'm sure there are many of you listening who
have implemented these in various different ways. Um, I know a favorite of
mine to get the first and last name is to do, like, string of before space, and
-that's the first name- -Yeah
... and string, string of after, you know, that space means it's the last name. And
you can get caught out in places if people have put in, like, a middle name or, or
things like that as well. But
a tested package that's built on top of or off the, the work of Basecamp's Ruby Gem
means that
it's comprehensive. It's tested over a, a long, long period of time. So definitely
check that one out.
Awesome.
Uh, last package before we get to to... To these tutorials here. Uh, Laravel AI Chat
Starter Kit created by Pushpack Chahed is a modern starter kit that features real
time streaming responses using Prism, Inertia, Vue, and Tailwind CSS. Okay.
Don't sleep on this thing. Let me, let me kind of put this down for you here.
If you are wanting to interact with an AI model and you also are responsible perf-
for, for providing the interface that allows you to interact with that model, as
well as stream back the responses, this is a starter kit for Laravel that gives
you everything you need to get up and running with that from zero really
quickly.
As I said, it's a starter kit. So as of Laravel 12, we now have these starter kits
that you can ship things with. So to get started with this, all you do is Laravel
new, and then you use PUSHPACK1300/AICHAT. That's it. And it will give you all of
this ready to go. Real time AI responses, which are streamed as they're generated.
Reasoning support, so it has support for AI models with reasoning capabilities. I-
it allows for multiple AI providers. Thank you, Prism. AI, OpenAI, Anthropic,
Gemini, Ollama, Grok, et cetera. All those things. It has a built in authentication
system for user authentication and management. It has a light and a dark
mode. It has custom theming with ShadCN. So if you've not used Sha- ShadCN before,
uh, you know, this is something that's usually... It was kind of created
originally for React, but it's been ported over to Vue. So now you can do easy theme
customization with just simple CSS variables. Really nice there. And then
also allows you to do chat sharing, which is, uh, allowing you to share
conversations with other users. This is something that ChatGPT has done in the not
too, um...... re- you know, not too distant past, which has been really
helpful for myself. Specifically, I'll- I'll write something up, wanna share it
with my wife. I either have to copy and paste this whole conversation or I can
say, "Just share this over to this person," and it kinda gives them the
entire context. So a really, really comprehensive starter kit here, as well as
shipping with an enum that specifies the model names that you'd like to use. So,
you know, you've got GPT-4-0-mini- mini, and GPT-41-nano, and 04-mini. And
if you didn't know the names of these or how they're specifically... It's sort of
like when you're doing regions for Amazon. It's like, was it US, ES- US East 1 or
East 2, or which one was it? This just kinda simplifies that for you by providing
an enum that has all those values ready for you to go to plug in. So if this is
something you've needed to do, even if you just wanted to play around with Prism,
this is a great spot for you to just grab the starter kit, spin it up, and give it a
try. So really, really cool here. Thanks to Pushpack and Chahajed for, uh, creating
that. Very nice.
Nice. Uh, several tutorials this week, all of them from our favorite, Harris
Raftopoulos. All of them framework reminders, if I have classified them
correctly. I'm gonna run through them all and leave them to you, dear listener, to
go forward and read them. First up, simplifying stream handling with Laravel's
resource method. We've got dependency injection in Laravel closure commands,
Laravel's inarrayKeys rule allowing you to validate partial array keys, content
negotiation with Laravel's prefers method. There is Laravel request content type
inspection methods, as well as blade authorization directives for Vue security,
enhancing JSON responses with Laravel's modelappends property, enhanced Enum
processing with Laravel's default parameter support, custom object casting
in Laravel models, and Laravel's ruleContains method for fluent array
validation. All of these things that we have spoken about at various points in
time on Laravel News, and Harris, as always, has helpfully gone through and
just expanded on the high-level stuff that we talk about on the show to give you
more context around how you might use some of this functionality in your projects.
Yep. They are actually so well-written, and he does a really good job breaking
down the high-level things that we're talking about. When we're talking about
release things, a lot of times it's just the bullet point version.
-Mm-hmm. -Here's the feature, top level. And maybe
you don't have as much of a grasp on, "How exactly do I use this inside my
application?" Or, "What are some examples of places where I might use this?" He
takes all those and expands them to a full tutorial and provides, uh, details on all
of that. Really well-written, really easy to follow, and most of them you could
read through and understand within, I'm talking five minutes, right? You should
definitely go through these, read these on a lunch break. It's gonna be really
helpful. And there's so much stuff that's going into the framework these days, it's
easy to lose that there's some of these amazing things that you have never even
heard of, right? Even if you read through the documentation, you might not know that
these things exist. So definitely check these tutorials out. They're super val-
super valuable and are gonna help you level up to the next
level. And also, speaking of,
if you're interested in leveling up to the next level and you are over on the side
of the world, uh, where Australia is near you, you should definitely be grabbing
your tickets to Laracon AU. Michael, give us some dates that we should be looking
-at. -Yeah. November 13th and 14th in Brisbane
this year. Um, we have sold over half of our early bird allocation as well, uh, and
that will run until the 7th of August unless sold out earlier. So if, uh, if
you've missed the boat on Laracon US, then, uh, Laracon AU is happy for you to
join us. If you go to Laracon US and you think you want some more Laracon in your
life, there will still be about a week to grab your early bird tickets after that
happens. So I'd love to see you there. And, uh, we're- we're in the thick of
announcing speakers at the moment as well. So looking forward to getting all those.
It's one less secret I need to keep from the community , so definitely enjoying
this part of, uh, the preparation process, for sure.
Absolutely. Hey, folks. Michael and myself will also be at Laracon US this year,
which is coming up right around the corner. I think both of us will be there
on the... Ooh, let's see.
-28th. -28th? Yes, we'll both be on the 28th. I'll
be there through the 31st. Please say hello. We would love to see you and hear
from you. It's always great to, uh, hear from people who are able to listen to the
show, and very much looking forward to catching up with all you lovely folks
there. This has been episode 241. You can find show notes for it at
podcast.laravel-news.com/241. Please rate us up in your podcatcher of choice. Five
stars would be amazing if you enjoyed the show. And of course, any comments or
questions you might have, hit us up on BlueSky or on X @MichaelDerenda,
@JacobBennett, or @Laravel News. Folks, until next time, it's been a fun one. We
will see ya.
Bye.