Laravel 9.14, weekly updates, and 🔥 tip
Couple new features and fixes in today's release of Laravel 9.14. Here are some highlights:
- Attach a concise error message to SES exceptions in #42426
- Fix route parameter not explicity specified in custom binding in in #42425
- Add dynamic
trashedfactory state in #42414
- Support passing Eloquent collections to
- Add bootable traits to
- Use route parameters in view in #42461
- Support passing callback to
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.
Last week I had a little more Human Shifts. I ended up helping with deployment and shaking out some of the inevitable bugs during a multi-version upgrade.
As you may have seen in the release highlights, I also opened some PR's for Laravel. These were for long-standing paper cuts which finally annoyed me enough to resolve.
I also had to quickly patch a change within the GitLab API. Apparently their access tokens now expire after 2 hours. I'm still resolving some issues related to this.
This week I hope to continue on some of the Workbench issues as Jess and I work towards releasing v1.0 of the desktop app in late June.
While coding I also ran into a bit of a "gotcha" with PHP's null safe operator (
?->) - the variable has to be defined.
I, mistakenly, assumed I could use it for both potentially
null values as well as undefined variables.
However, the following throws an error due to the variable being undefined.
$tmp = $undefined?->property;
optional() helper also throws an error for undefined variables.
Digging a bit deeper, the null coalesce operator (
??) does work if you're attempting to access a property. But not if you're invoking a method.
// works for properties$tmp = $undefined->property ?? null;// throws an error for methods$tmp = $undefined->method() ?? null;