In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you about the changes in Laravel 8.73, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The Laravel team released 8.73, which supports Countable objects in the string plural, allowing the use of closures to determine the latest changes in cached TTL, lazyByIdDesc () query builder methods, and v8.x branches.
This article contains some versions updated over the past few days, including the recovery in 8.73.1, so be sure to update to the latest 8.x version:
Add .phar to the blocked PHP extension (8.73)
Stephen Rees-Carter added the. phar extension to block the PHP extension during file upload:
By default, Debian supports the execution of .phar files as well as .php and .phtml files, and should be included in the block list.
See: salsa.debian.org/php-team/php/-/bl...
This should also be migrated to all currently supported Laravel versions.
Allows closures to be passed as TTL in the cached remember () method.
Gerard Nesta contributes to the method of passing Closure as TTL in the Cache::remember () method:
Cache::remember ('count_events_hosted', / / now you can use a closure to calculate TTL function () use ($user) {/ / expire when recent events end $closestEventEndsAt = $user- > hostedEvents ()-> select (' ends_at')-> where ('starts_at',' >' Date::now ()-> orderBy ('ends_at')-> limit (1)-> value (' ends_at') Return $closestEventEndsAt? Date::parse ($closestEventEndsAt): 60;}, function () use ($user) {return $user- > hostedEvents ()-> ended ()-> count ();}); implement lazyByIdDesc in descending order
Moshe Brodsky contributes a lazyByIdDesc () method that blocks the query results by comparing ID in descending order, thus delaying the query:
$query- > lazyByIdDesc ()
When working with large amounts of data, it is useful that you want to deal with "newer" objects first.
The PasswordReset method is used to reset URL.
Oliver Kaufmann's contribution moves the generation of reset URL to a separate method for notification of PasswordReset. Similar to VerifyEmail, it allows users to override the default URL generation logic without overriding the toMail () method.
Add countable support for the pluralizer (8.72)
Michael Dyrynda adds the Str::plural () method for countable values. You can pass in anything detected by the is_countable () method of PHP, which implements the Countable interface, and you can take the detection item as the second parameter:
/ / Arrays$this- > assertSame ('users', Str::plural (' user', [])); $this- > assertSame ('user', Str::plural (' user', ['one'])); $this- > assertSame (' users', Str::plural ('one',' two'])); / / Collections$this- > assertSame ('users', Str::plural (' user', collect () $this- > assertSame ('user', Str::plural (' user', collect (['one'])); $this- > assertSame (' users', Str::plural ('one',' two'])); release notes
You can see the complete list of new features and updates and the differences between 8.71.0 and 8.73.1 on GitHub below. The following release notes come directly from changelog:
V8.73.1 undo
Undo using parents to resolve middleware priorities in SortedMiddleware (# 39706)
V8.73.0 add
Add .phar to the validator to prevent PHP extension (# 39666)
Allow closures to be passed as ttl in the Cache remember () method (# 39678)
Added a forbidden validation rule to the dependentRules property (# 39677)
Implement lazyById in descending order (# 39646)
Repair
Fixed Illuminate/Auth/Notifications/ResetPassword::toMail () (969f101)
Fixed assertSoftDeleted & assertNotSoftDeleted (# 39673)
V8.72.0 supplement
Add additional methods in PasswortReset to reset URL to match the structure of VerifyEmail (# 39652)
Add support for countable tables Illuminate/Support/Pluralizer::plural () (# 39641)
Allow users to specify options for migrate data migration (# 39637)
Repair
When not null, only the $value is cast to Illuminate/Database/Query/Builder::limit () (# 39644)
Change
Parsing middleware priority SortedMiddleware using parent node (# 39647)
These are all the contents of this article entitled "what are the changes in Laravel 8.73?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.