Adding try/catch to Laravel collections original

by Freek Van der Herten – 1 minute read

Today, JMac and I did streamed a code pairing session. Our goal was to add a try/catch methods to Laravels collection class.

Basically we we try to make JMac's dream, that he tweeted a few days ago, come true.

Here's a recording of our stream.

JMac and I are going to polish it a bit more, add some test coverage, and PR it Laravel soon.

EDIT: here is the stream that JMac and I did the day after polishing the PR.

And this is the PR submitted to Laravel.

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

"Freek publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"

Joey Kudish — Shipping with AI as a teammate

No spam. Unsubscribe anytime. You can also follow me on X.

Found something interesting to share? Submit a link to the community section.