Laravel 11.9版本發(fā)布-支持暗模式的新的最小默認(rèn)異常頁(yè)面
Laravel  /  管理員 發(fā)布于 9個(gè)月前   532
Laravel團(tuán)隊(duì)發(fā)布了v11.9,其中包括一個(gè)新的默認(rèn)異常頁(yè)面、
一種防止破壞性命令運(yùn)行的方法、一個(gè)withoutDelay()隊(duì)列方法等等。
新建默認(rèn)異常頁(yè)面
當(dāng)您的應(yīng)用程序處于調(diào)試模式時(shí),Laravel現(xiàn)在附帶了一個(gè)最小的默認(rèn)異常頁(yè)面。
更新后的錯(cuò)誤頁(yè)面支持亮模式和暗模式:
Laravel 11.9中的新默認(rèn)異常頁(yè)面(暗模式)
當(dāng)debug為false時(shí),Exception頁(yè)面將繼續(xù)呈現(xiàn)默認(rèn)的Symfony視圖(除非您定義了自定義呈現(xiàn)器):
APP_DEBUG=false時(shí)的異常頁(yè)面
此更新僅影響新的Laravel應(yīng)用程序,因此現(xiàn)有應(yīng)用程序在安裝后仍將使用Ignition。
如果您想在新的Laravel應(yīng)用程序中繼續(xù)使用Spatie Ignition異常頁(yè)面,您可以使用Composer進(jìn)行安裝:
composer require spatie/laravel-ignition
有關(guān)更多詳細(xì)信息,請(qǐng)參閱拉動(dòng)請(qǐng)求#51261和#51587。
防止破壞性命令
Jason McCreary和Joel Clermont貢獻(xiàn)了一個(gè)“禁止”特性,以及防止破壞性命令運(yùn)行的代碼。
您也可以將這些添加到自定義Artisan命令中,
這些命令可能具有您不打算在某些環(huán)境(通常是生產(chǎn)環(huán)境)中運(yùn)行的破壞性行為:
use Illuminate\Console\Command;
use Illuminate\Console\Prohibitable;
class SomeDestructiveCommand extends Command
{
use Prohibitable;
}
// SomeDestructiveCommand::prohibit($this->app->isProduction());
Laravel框架包括一些包含“禁止”特性的數(shù)據(jù)庫(kù)命令,
如db:wipe、migrate:fresh、migrate:fresh和migrate:reset。
您可以單獨(dú)禁止它們,也可以使用DB Facade禁止所有上述命令:
// Prohibits: db:wipe, migrate:fresh, migrate:refresh, and migrate:reset
DB::prohibitDestructiveCommands($this->app->isProduction());
將withoutDelay()添加到可排隊(duì)特征
Kennedy Tedesco為排隊(duì)特性貢獻(xiàn)了一個(gè)withoutDelay()方法。
如果作業(yè)具有默認(rèn)延遲時(shí)間,
則可以在希望跳過(guò)該延遲而不是將0傳遞給delay()方法的情況下使用此選項(xiàng):
dispatch((new MyJob($data))->delay(0));
dispatch((new MyJob($data))->withoutDelay());
發(fā)布說(shuō)明
你可以在下面看到新功能和更新的完整列表,以及GitHub上11.8.0和11.9.0之間的差異。
以下發(fā)行說(shuō)明直接來(lái)自更改日志:
https://github.com/laravel/framework/compare/v11.8.0...v11.9.0
https://github.com/laravel/framework/blob/af8a8f6d715c04ecdb1d6cb2fa34ddaa699289d6/CHANGELOG.md#v1190---2024-05-28
v11.9.0
[11.x]通過(guò)@sarven在中使用哈希表存儲(chǔ)提供者,優(yōu)化boostrap時(shí)間
https://github.com/laravel/framework/pull/51343
[11.x]防止@jasonmccurry在中運(yùn)行破壞性命令
https://github.com/laravel/framework/pull/51376
[11.x]重命名后的左側(cè)必須包含@MrPunyapal
https://github.com/laravel/framework/pull/51532
[10.x]通過(guò)@Issei0804 ie in修復(fù)拼寫(xiě)錯(cuò)誤
https://github.com/laravel/framework/pull/51535
[11.x]通過(guò)@saMahmoudzadeh在Timebox.php中修復(fù)文檔塊
https://github.com/laravel/framework/pull/51537
[11.x]重命名測(cè)試函數(shù)以匹配中@faissaloux的禁止操作
https://github.com/laravel/framework/pull/51534
[11.x]修復(fù)LazilyRefreshDatabase在使用Laravel BrowserKit測(cè)試時(shí)
由@MaxGiting在https://github.com/laravel/framework/pull/51538
[10.x]修復(fù)中@staudenmeir在數(shù)據(jù)庫(kù)存儲(chǔ)中檢測(cè)到SQL Server的問(wèn)題
https://github.com/laravel/framework/pull/51547
[11.x]在中顯示@nshiro的測(cè)試創(chuàng)建消息
https://github.com/laravel/framework/pull/51546
[11.x]通過(guò)@sasachaglo在中檢測(cè)蟑螂數(shù)據(jù)庫(kù)連接丟失
https://github.com/laravel/framework/pull/51559
[11.x]通過(guò)@stayallive修復(fù)類型測(cè)試
https://github.com/laravel/framework/pull/51558
[11.x]在中通過(guò)@KennedyTedesco將withoutDelay()添加到可排隊(duì)特征
https://github.com/laravel/framework/pull/51555
[11.x]在中添加一個(gè)選項(xiàng)以刪除由@riasvdv加密后的原始環(huán)境文件
https://github.com/laravel/framework/pull/51556
[10.x]-修復(fù)Horizon中@jeffortegad序列化錯(cuò)誤時(shí)加載批處理列表的問(wèn)題
https://github.com/laravel/framework/pull/51551
[10.x]修復(fù)了中@CAAHS與BackedEnum的顯式路由綁定
https://github.com/laravel/framework/pull/51586
[11.x]在中通過(guò)@PerryvanderMeer將Macroable添加到PendingCommand
https://github.com/laravel/framework/pull/51572
[11.x]在中通過(guò)@nunomaduro改進(jìn)錯(cuò)誤
https://github.com/laravel/framework/pull/51261
[11.x]在中通過(guò)@Jubeki將RELEASE.md添加到.gitattributes
https://github.com/laravel/framework/pull/51598
[11.x]修復(fù)了@nunomaduro在中的異常渲染
https://github.com/laravel/framework/pull/51587
轉(zhuǎn):
https://laravel-news.com/laravel-11-9-0
123 在
Clash for Windows作者刪庫(kù)跑路了,github已404中評(píng)論 按理說(shuō)只要你在國(guó)內(nèi),所有的流量進(jìn)出都在監(jiān)控范圍內(nèi),不管你怎么隱藏也沒(méi)用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最簡(jiǎn)單的方法中評(píng)論 好久好久都沒(méi)看友情鏈接申請(qǐng)了,今天剛看,已經(jīng)添加。..博主 在
佛跳墻vpn軟件不會(huì)用?上不了網(wǎng)?佛跳墻vpn常見(jiàn)問(wèn)題以及解決辦法中評(píng)論 @1111老鐵這個(gè)不行了,可以看看近期評(píng)論的其他文章..1111 在
佛跳墻vpn軟件不會(huì)用?上不了網(wǎng)?佛跳墻vpn常見(jiàn)問(wèn)題以及解決辦法中評(píng)論 網(wǎng)站不能打開(kāi),博主百忙中能否發(fā)個(gè)APP下載鏈接,佛跳墻或極光..路人 在
php中使用hyperf框架調(diào)用訊飛星火大模型實(shí)現(xiàn)國(guó)內(nèi)版chatgpt功能示例中評(píng)論 教程很詳細(xì),如果加個(gè)前端chatgpt對(duì)話頁(yè)面就完美了..
Copyright·? 2019 侯體宗版權(quán)所有·
粵ICP備20027696號(hào)