Laravel 12.15, weekly updates, and weekly tip
Laravel 12.15
Lots in this week's release bringing us to Laravel 12.15.0.
- Add locale-aware number parsing to Number class in #55725
- Add a default option when retrieving an enum from data in #55735
- Preserve "previous" model state in #55729
- Passthru
getCountForPagination
on Builder in #55752 - Add
assertClientError
toTestResponse
in #55750 - Add
hash
string helper in #55767 - Update
assertSessionMissing
to test values in #55763 - Add
assertRedirectToAction
to test redirection to controller actions in #55788 - Add
Context
contextual attribute in #55760
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
Last week I livestreamed a Part 4 deploying my Laravel/Cashier to sell printed copies of BaseCode. It was a bit of a day-in-the-life-of-a-dev with problem after problem. Anyway, it's currently in maintenance mode pending some final tweaks. I'll announce its launch first in a future newsletter.
With the rest of the week, I completed the migration to Stripe Checkout for both single orders and subscriptions. Unfortunately there doesn't seem to be a way to have users with saved cards appear in Stripe Checkout. Apparently these payment methods are legacy and can not be migrated. So, users with unexpired saved cards will still see the onsite checkout. Eventually those cards will expire and everyone will see Stripe Checkout.
This weekend I leave for a much needed vacation. Fortunately Emma downgraded to a waterproof walking cast. So she'll be able to enjoy the pool and hopefully not need her dad to carry her around everywhere.
Weekly Tip
This week's tip is about the assertSessionMissing
changes. First, this was a PR from JT who I'm pairing with on WP Static. So congrats on your first PR.
Second, after upgrading to Laravel 12.15, our WP Static test suite started failing. We had accidently been passing assertSessionMissing
a second argument. Likely a copy/paste bug.
$response->assertSessionMissing('stripe_payment_id', $payment_id);
Prior to Laravel 12.15, this assertion simply ignored the argument. But now it will check that the session key is set, but doesn't match the passed value.
So, in our case, this resulted in a null
(missing session value) not matching $payment_id
.
Just a heads up if you suddenly have assertSessionMissing
fail. You probably had the same copy/paste bug we did and should simply remove the second argument.