preloader

Laravel News
Laravel News
Laravel News
March 9th, 2022

The Laravel team released 9.4 with the ability to override CSRF cookies, a Str::lcfirst() method, an optional retry mechanism for queued mailables, and more:
@jaggy contributed the ability to override the VerifyCsrfToken by defining a newCookie method on an application’s extended CSRF middleware:
While most applications won’t need to override the default behavior, the PR author provides the following use-case:
There are some cases in multi-tenant systems that the user might want to change the CSRF token name to prevent 419 errors. Multiple Auth providers make this happen as well mainly in XHR requests. This also allows multi-tenant systems to update the token’s domain (ie, pull the current tenant’s custom domain) from the middleware layer.
I think this is going to help a lot with people using Inertia to allow customization in how XSRF-TOKEN is named by adding the tenant ID, or even the user type.
Matthew Hailwood contributed a new soleValue() method to query builders to return a column from the sole value instead of the whole record:
This update allows the following usage:
Vincent Prat contributed a lcfirst() method to the Str and Stringable classes, which also supports non-ASCII characters:
@madman-81 contributed a Has Mutex column to the schedule:list command, indicating if a mutex blocks a command. Issue #41311 explains how this column can help debug any scheduler issues:
Today I ran into an issue with a scheduled task that wasn’t running. It took me a while to figure out was going on, mostly because the schedule:list showed nothing out of the ordinary and was updating the “Next Due” timestamp as expected. However the tasks wasn’t executed. Long story shot, the tasks got stuck because a mutex wasn’t cleared, probably because of an unscheduled server reboot.
Here’s an example of the output based outlined in the above issue:
Hafez Divandari contributed the ability to modify a char column type:
[The] doctrine/dbal package actually supports modifying char column types as StringType::class by setting fixed option to true.
So this PR, maps Laravel char to its Doctrine equivalent string type and set fixed option to true that finally gets the SQL snippet to declare a CHAR column .
MaxGiting contributed the ability to specify a retryUntil() method or timeoutAt property to queued mailables. Check out Pull Request #41393 for more details.
You can see the complete list of new features and updates below and the diff between 9.3.0 and 9.4.0 on GitHub. The following release notes are directly from the changelog:
Filed in:

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.
Join 33,000+ others and never miss out on new tips, tutorials, and more.
The official Laravel job board connecting the best jobs with top talent.
April 15th, 2022
April 14th, 2022
April 13th, 2022
Subscribe to the Email Newsletter
Follow Laravel News on
Facebook
Twitter
LinkedIn
Instagram
Design & development by
© 2012 – 2022 Laravel News
A division of dotdev inc.

source

Related Post

Leave a Reply

Your email address will not be published.

Translate »