Laravel 8.58, weekly updates, and 🔥 tip
Laravel 8.58
Had a patch release last week containing some new features (8.57) and even more this week which brings Laravel to 8.58.0.
Here are the highlights:
- Keep backward compatibility with custom ciphers in #38556
- Add
assertUnprocessable
response assertion in #38553 - Add the password reset URL to the
toMailCallback
in #38552 - Allow passing when callback to Http client retry method in #38531
- Allow sync broadcast via method in #38557
- Add a simple where helper for querying relations in #38499
- Add
updateOrFail()
to Model in #38592 - Add
exclude
validation rule in #38537 - Add
prohibits
validation rule in #38612 - Make Validator
sometimes
work with nested arrays in #38443
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
While I continued to patch the remaining Shift bugs last week, my main focus was building the Pest Converter.
I continued to live stream each day. In fact, I streamed twice on Wednesday. All of the recordings are within the Shift playlist on YouTube. I also posted a thread on Twitter with highlights and a link to each video.
We started from no code on Monday and yesterday was able to launch a beta version of the Pest Converter! Pretty amazing.
This was a nice little challenge for me to use the downtime in which I would've been building a Shift anyway (Laravel 9). It was also nice to have a scheduled way to "work in the open". While viewers fell off as the week progressed, I received feedback from numerous devs saying enjoyed the streams and planned to watch more.
On that front, I consider it a success. Time will tell if it was a successful business move. For now, it was a bit of a trial run for an idea I have for later this year - "Upgrade Week".
This week I'm heading to Bloomington, Illinois for a Laracon viewing party. It's 4 hours there and 4 hours back. So I'll be listening to some podcasts and maybe dictating a few blog posts.
To that point Jess and I will be wrapping up all of these newsletters into a blog. Very similar to The Laravel blog. Just a place for me to publish these after sending so they are easily shareable and help SEO a bit.
🔥 Tip
A little gotcha I found when working on the Pest Converter was the second parameter to preg_quote
.
I consider myself a master of Regular Expressions, and while familiar with this method, I was not setting this parameter properly. Since the common delimiter in PHP (/
) is technically not a special character it is not quoted (escaped).
This resulted in an invalid pattern string when I was parsing some references. So, if you're ever creating dynamic Regular Expressions, ensure you pass the delimiter as the second argument.
1$reference = '$this';2$pattern = '/' . preg_quote($reference, '/') . '->/';