Laravel 11.14版本發(fā)布 - 新的字符串助手和ServeCommand改進(jìn)
Laravel  /  管理員 發(fā)布于 8個(gè)月前   544
Laravel團(tuán)隊(duì)上周中期發(fā)布了v11.13,本周發(fā)布了v111.4。
這些版本增加了新的字符串方法,如chopStart和chopEnd,
支持Laravel的string markdown方法的Commonmark擴(kuò)展,Number::pairs()方法等等。
弦樂(lè)chopStart和chopEnd(v11.13)
Tim MacDonald貢獻(xiàn)了兩種字符串方法,用于從字符串的開(kāi)頭或結(jié)尾截?cái)嘧址?/span>
chopStart和chopEnd方法可以使用Str o Stringable`類(lèi)獲得:
Str::chopEnd('path/to/file.php', '.php');
// "path/to/file"
Str::chopStart('https://laravel.com', ['https://', 'http://']);
// laravel.com
為Str::markdown()和Stringable類(lèi)添加對(duì)擴(kuò)展的支持
Tony Lea支持將Commonmark擴(kuò)展作為第三個(gè)參數(shù)傳遞給Str::markdown()方法:
$html = Str::markdown($markdown_contents, [], [
new AttributesExtension(),
new TaskListExtension(),
]);
在Laravel 11.14中,Luke Downing延續(xù)了Tony Lea的貢獻(xiàn),
在Stringable類(lèi)中添加了對(duì)Commonmark擴(kuò)展的支持:
$html = str('# My Heading')->markdown(
extensions: [new HeadingPermalinksExtension()]
);
Macroable TokenGuard(v11.13)
@Iman在TokenGuard類(lèi)中添加了Macroable特性,以支持此保護(hù)上的自定義宏。
有關(guān)詳細(xì)信息,請(qǐng)參閱Pull Request#51922。
添加編號(hào)::pairs()(v11.13)
Adam Campbell貢獻(xiàn)了Number::pairs()方法,
該方法“提供了將數(shù)字‘拆分’為最小/最大值對(duì)的能力。
這有點(diǎn)像滑動(dòng),只是該方法將為您確定值?!保?/span>
$output = Number::pairs(25, 10);
// [[1, 10], [11, 20], [21, 25]]
$output = Number::pairs(25, 10, 0);
// [[0, 10], [10, 20], [20, 25]]
$output = Number::pairs(10, 2.5, 0)
// [[0, 2.5], [2.5, 5.0], [5.0, 7.5], [7.5, 10.0]]
使用PHP的SensitiveParameter屬性標(biāo)記敏感參數(shù)(v11.14)
Philip Iezzi對(duì)Laravel進(jìn)行了更新,試圖用PHP>=8.2的SensitiveParameter屬性標(biāo)記敏感參數(shù)。
這是一個(gè)很好的提醒,如果您運(yùn)行PHP>=8.2,請(qǐng)?jiān)趹?yīng)用程序代碼中利用此屬性。
有關(guān)詳細(xì)信息,請(qǐng)參閱Pull Request#51940。
改進(jìn)工匠服務(wù)指揮
Seth Phat對(duì)工匠發(fā)球命令做出了改進(jìn):
打印出一個(gè)更好的請(qǐng)求時(shí)間,對(duì)于需要不到1秒的請(qǐng)求,~0s似乎根本沒(méi)有幫助。
顯示請(qǐng)求的路線,而不是“………”
耗時(shí)不到1秒的請(qǐng)求現(xiàn)在以毫秒而不是0打印時(shí)間:
發(fā)布說(shuō)明
Laravel 11.13于上周中期發(fā)布,因此以下發(fā)布說(shuō)明來(lái)自這兩個(gè)版本。
您可以在GitHub上看到下面新功能和更新的完整列表,以及11.12.0和11.14.0之間的差異。
以下發(fā)行說(shuō)明直接來(lái)自變更日志:
https://github.com/laravel/framework/compare/v11.12.0...v11.14.0
https://github.com/laravel/framework/blob/b397704f8a5bae532bd03fa4acf8aa08cd40c4e7/CHANGELOG.md#v11140---2024-07-02
v11.14.0
在@barttenhoed的publish命令中添加害蟲(chóng)存根https://github.com/laravel/framework/pull/51933
[11.x]在@JamesFreeman的FakeJob中添加了attempts()方法https://github.com/laravel/framework/pull/51951
[11.x]通過(guò)@Jubeki在Ubuntu 24.04上運(yùn)行所有工作流https://github.com/laravel/framework/pull/51946
[11.x]改進(jìn)Arr類(lèi)中mapSpread方法的PHPDoc,并通過(guò)@lmottasin從IDE中刪除警告https://github.com/laravel/framework/pull/51952
從3.0.2到3.0.3的凹凸大括號(hào)位于/src/Lilluminate/Foundation/resources/exceptions/renderer中,由@religiot在https://github.com/laravel/framework/pull/51955
[11.x]通過(guò)@seriquynh刪除AssertableJsonString中無(wú)法訪問(wèn)的代碼https://github.com/laravel/framework/pull/51943
[11.x]通過(guò)@seriquynh修復(fù)TestResponseAssert文檔塊https://github.com/laravel/framework/pull/51942
[11.x]壯舉:通過(guò)@calebdw在https://github.com/laravel/framework/pull/51938
[11.x]在中用@online標(biāo)記具有SensitiveParameter屬性的敏感參數(shù)https://github.com/laravel/framework/pull/51940
[11.x]為Stringable類(lèi)添加了對(duì)Markdown擴(kuò)展的支持。通過(guò)@lukeraymonddowning inhttps://github.com/laravel/framework/pull/51932
[11.x]通過(guò)@seriquynh在Components\Factory類(lèi)中添加秘密方法聲明https://github.com/laravel/framework/pull/51949
[11.x]通過(guò)@Jubeki在Windows 2022上運(yùn)行工作流,并使用bash而不是powershellhttps://github.com/laravel/framework/pull/51958
[11.x]通過(guò)@chu121su12修復(fù)重復(fù)的返回類(lèi)型PHPDochttps://github.com/laravel/framework/pull/51965
[11.x]修復(fù)中@nshiro的測(cè)試失敗消息https://github.com/laravel/framework/pull/51974
[11.x]更新測(cè)試以確保郵件消息在中通過(guò)@seriquynh實(shí)現(xiàn)流暢的接口模式https://github.com/laravel/framework/pull/51969
[11.x]通過(guò)@hafezdivandari在HttpResponseException上設(shè)置上一個(gè)異常https://github.com/laravel/framework/pull/51968
[11.x]修復(fù)@zbundy在SupportCollectionTest中的拼寫(xiě)錯(cuò)誤https://github.com/laravel/framework/pull/51966
[11.x]@sethsandaru對(duì)ServeCommand的改進(jìn)(添加更多愛(ài)并提升DX)https://github.com/laravel/framework/pull/51957
[11.x]添加了對(duì)@haniha在MariaDb連接中使用castAsJson的支持https://github.com/laravel/framework/pull/51963
[11.x]通過(guò)@innocenzi在中添加對(duì)通過(guò)容器對(duì)屬性進(jìn)行操作的支持https://github.com/laravel/framework/pull/51934
[11.x]修復(fù)組件:resolveComponents使用@seriquynh的測(cè)試https://github.com/laravel/framework/pull/51988
[11.x]通過(guò)@seriquynh更新composer.json文件以提供PSR實(shí)現(xiàn)https://github.com/laravel/framework/pull/51983
[11.x]在中為@hpaia的軟刪除事件添加排隊(duì)閉包類(lèi)型https://github.com/laravel/framework/pull/51982
[11.x]修復(fù)了@guiqibusixin在不同上下文中使用容器嵌套制作相同“抽象”的問(wèn)題https://github.com/laravel/framework/pull/51989
[11.x]修復(fù)了@Tofandel在https://github.com/laravel/framework/pull/51984
v11.13.0
[11.x]通過(guò)@tnylea在Str::markdown方法中添加對(duì)擴(kuò)展的支持https://github.com/laravel/framework/pull/51907
[11.x]更新配置:通過(guò)@seriquynh在中顯示命令https://github.com/laravel/framework/pull/51902
[11.x]通過(guò)@seriquynh修復(fù)控制臺(tái)提示docblockhttps://github.com/laravel/framework/pull/51913
[11.x]修復(fù)了@seriquynh在https://github.com/laravel/framework/pull/51916
[11.x]在中用@timacdonald將$queue標(biāo)記為可空https://github.com/laravel/framework/pull/51912
@imanghafoori1在TokenGuard上使用Macroable traithttps://github.com/laravel/framework/pull/51922
[11.x]通過(guò)@seriquynh更新命令::fail()停靠塊和測(cè)試https://github.com/laravel/framework/pull/51914
還原并添加@jasonmccreary的測(cè)試https://github.com/laravel/framework/pull/51924
[11.x]在中顯示@nshiro的視圖創(chuàng)建消息https://github.com/laravel/framework/pull/51925
[11.x]介紹Str::chopStart和Str::chapEnd作者@timacdonaldhttps://github.com/laravel/framework/pull/51910
feat:添加數(shù)字::成對(duì)@hotmeteor inhttps://github.com/laravel/framework/pull/51904
[11.x]通過(guò)@crynobone在中修復(fù)了通過(guò)進(jìn)程給定命令作為數(shù)組的轉(zhuǎn)義路徑https://github.com/laravel/framework/pull/51926
[11.x]通過(guò)@princejohnsantillan在中自定義MultipleInstanceManager驅(qū)動(dòng)程序字段https://github.com/laravel/framework/pull/51905
[11.x]在新的Laravel錯(cuò)誤頁(yè)面上由@shengslogar解釋長(zhǎng)字符串https://github.com/laravel/framework/pull/51880
轉(zhuǎn):
https://laravel-news.com/laravel-11-14-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)