消息

Mercure Broadcasting in Laravel 13.32

发布
Mercure Broadcasting in Laravel 13.32 image

发布更新

绝不错过任何 Laravel 版本发布

Laravel 新版本发布时,您将收到电子邮件通知。

The Laravel team released v13.32.0 with a new Mercure broadcast driver, copyToDisk() 和 moveToDisk() methods on the filesystem, enum support in queue pause and resume, and more:

Mercure Broadcast Driver

凯文·邓格拉斯 contributed a broadcast driver for 汞 , a real-time protocol that runs over SSE instead of WebSockets:

// config/broadcasting.php
'汞' => [
'司机' => '汞' ,
'url' => 环境 ( 'MERCURE_URL' ),
'public_url' => 环境 ( 'MERCURE_PUBLIC_URL' ),
'秘密' => 环境 ( 'MERCURE_JWT_SECRET' ),
'encryption_key' => 环境 ( 'MERCURE_ENCRYPTION_KEY' ),
],

和 弗兰肯PHP , the built-in hub needs no url 或者 secret . The driver also supports presence channels and end-to-end encrypted private-encrypted-* channels. A companion Echo patch adds client support.

看 #61474 和 broadcasting installer support in #61587 更多细节。

贮存 copyToDisk() 和 moveToDisk()

杰克·贝利斯 贡献了 copyToDisk() 和 moveToDisk() 到 FilesystemAdapter , replacing the manual read-stream-then-write-stream pattern for moving files between disks:

// Copies to the backup disk, retaining the file on the local disk
贮存 :: 磁盘 ( '当地的' ) -> copyToDisk ( 'backup' , 'reports/report.csv' (英文):
// Copies to the backup disk, deleting the file from local disk
贮存 :: 磁盘 ( '当地的' ) -> moveToDisk ( 'backup' , 'reports/report.csv' (英文):
// Specify a different destination path
贮存 :: 磁盘 ( '当地的' ) -> copyToDisk ( 's3' , 'reports/report.csv' , '2026/report.csv' (英文):

A follow-up PR lets you pass a filesystem instance instead of a disk name.

看 #61511 更多细节。

Enums in Queue Pause and Resume

杰克·贝利斯 contributed enum support for Queue::pause() , Queue::resume() , 和 Queue::pauseFor() , matching the enum support already available on job Queue / Connection attributes and manager methods like route() 和 forward() :

队列 :: 暂停 ( 尾巴 :: 通知 , 連接 :: 雷迪斯 (英文):
队列 :: 恢复 ( 尾巴 :: 通知 , 連接 :: 雷迪斯 (英文):
队列 :: 暂停 ( 尾巴 :: 通知 , 連接 :: 雷迪斯 , 60 (英文):

看 #61464 更多细节。

发行说明

您可以在下面查看新功能和更新的完整列表以及之间的差异 13.31.0 and 13.32.0 在 GitHub 上。以下发行说明直接来自 变更日志 :

v13.32.0

保罗·雷德蒙德照片

Laravel News 特约撰稿人。全栈 Web 开发人员兼作家。

赞助

acquaintsoft 标志
了解软科技

以每小时 20 美元的价格聘请具备人工智能专业知识的 Laravel 开发人员。48 小时内即可开始工作。

访问 Acquaint Softtech
Laravel 14 Adds a defaults() Method to Eloquent Models image

Laravel 14 Adds a defaults() Method to Eloquent Models

阅读文章
Laravel AI SDK and Laravel MCP Security Fixes: Update Now image

Laravel AI SDK and Laravel MCP Security Fixes: Update Now

阅读文章
Mailbox for Laravel: Preview and Test Rendered Email image

Mailbox for Laravel: Preview and Test Rendered Email

阅读文章
Count Worker Crashes as Job Exceptions in Laravel 13.34 image

Count Worker Crashes as Job Exceptions in Laravel 13.34

阅读文章
Elastic Bridge: Eloquent-Style Queries for Elasticsearch and OpenSearch image

Elastic Bridge: Eloquent-Style Queries for Elasticsearch and OpenSearch

阅读文章
Laravel Release Cycle: Versions, Support Policy, and Dates image

Laravel Release Cycle: Versions, Support Policy, and Dates

阅读文章