Bulk Job Dispatching with Bus::bulk() in Laravel 13.13

最后更新于 经过

Bulk Job Dispatching with Bus::bulk() in Laravel 13.13 image

The Laravel team released v13.13.0 with a new method for dispatching many jobs in a single batch, storage-backed attachment helpers for notifications, PSR-18 support for the HTTP client, and a handful of validation and database fixes.

  • Bus::bulk() for efficient dispatching of many jobs
  • attachFromStorage() helpers on notification mail messages
  • HTTP client usable as a PSR-18 client
  • Cache attribute support for memoization
  • MariaDB vector index support
  • Validation and query builder bug fixes

什么是新的

Bus::bulk() for Dispatching Many Jobs

@jackbayliss 添加 Bus::bulk() , which dispatches an array of jobs to the queue while grouping them by connection and queue so they can be pushed using the underlying bulk() queue method. Unlike Bus::batch() , it does not track batch progress in the database, so it fits cases where you want to enqueue many jobs without that overhead.

使用 照明\支持\立面\总线 ;
公共汽车 :: bulk 数组映射 fn 用户 $user) => 新的 ProcessUser ($user), $users));

公关稿: #60297

Storage Attachments for Notification Mail Messages

@LucasCavalheri 添加 attachFromStorage()attachFromStorageDisk() to the notification MailMessage class, bringing it in line with the attachment helpers already available on mailables.

新的 邮件信息
-> attachFromStorage '/path/to/file'
-> attachFromStorageDisk 's3' , 'invoices/1.pdf' , 'invoice.pdf' ,[
'mime' => 'application/pdf' ,
]);

公关稿: #60268

HTTP Client as a PSR-18 Client

@willrowe made the client returned by Http::buildClient() usable anywhere a Psr\Http\Client\ClientInterface is expected. You can hand Laravel's HTTP client to a third-party package that requires a PSR-18 client, so its requests run through the same middleware and handler stack as the rest of your application.

$geocoder = 新的 GeocodingService Http :: buildClient ());

公关稿: #60295

Cache Attribute Memoization

@jenky 更新了 Cache attribute to support injecting a memoized cache instance into constructors and resolve methods, building on the cache memoization added in earlier 13.x releases.

公关稿: #60309

MariaDB Vector Index Support

@michielvaneerd added vector index support for MariaDB in the schema builder.

公关稿: #60334

Validation and Query Fixes

This release also includes several fixes:

  • @Button99 corrected inverted ratio comparison operators in image dimension validation ( #60290 )。
  • @ahawlitschek fixed a crash in whereDatewhereTime when the column is an Expression#60314 )。
  • @PeteBishwhip made sole() report a MultipleRecordsFoundException#60294 )。
  • @ErfanMomeniii 更新 isUniqueConstraintError() to catch SQL Server error 2627 ( #60320 )。
  • @kieranbrown fixed FIFO queue name normalization in Cloud managed queues ( #60315 )。
  • @crynobone 固定的 Illuminate\Http\Response compatibility with Symfony 8.1 ( #60318 )。

参考

保罗·雷德蒙德照片

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

归档于:
立方体

Laravel 时事通讯

加入超过 4 万名开发者的行列,不错过任何新的技巧、教程等内容。

图像
廷克威尔

这款编辑器专为快速反馈和快速迭代而设计,让您尽享编码和调试的乐趣。它就像您应用程序的一个外壳——但具备多行编辑、代码自动完成等更多功能。

参观廷克韦尔
了解 Softtech 的标志

了解软科技

Acquaint Softtech 提供 AI 就绪的 Laravel 开发人员,48 小时内即可上手,每月费用为 3000 美元,没有冗长的销售流程,并提供 100% 退款保证。

了解软科技
PhpStorm 标志

PhpStorm

首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

PhpStorm
SaaSykit:Laravel SaaS 入门套件徽标

SaaSykit:Laravel SaaS 入门套件

SaaSykit 是一个多租户 Laravel SaaS 入门套件,包含运行现代 SaaS 所需的所有功能,例如支付、美观的结账界面、管理面板、用户仪表盘、身份验证、现成组件、统计数据、博客、文档等等。

SaaSykit:Laravel SaaS 入门套件
鱼叉:新一代时间跟踪和发票标志

Harpoon:新一代时间跟踪和发票系统

新一代时间跟踪和计费软件,帮助您的机构规划和预测盈利的未来。

Harpoon:新一代时间跟踪和发票系统
Kirschbaum 标志

樱桃树

提供创新和稳定性,确保您的Web应用程序取得成功。

樱桃树
Lucky Media 标志

幸运传媒

Get Lucky Now——拥有十余年经验的 Laravel 开发理想之选!

幸运传媒
Laravel Cloud 标志

Laravel 云

轻松创建和管理服务器,并在几秒钟内部署 Laravel 应用程序。

Laravel 云
Tinkerwell 徽标

廷克威尔

Laravel 开发者必备的代码运行器。可在本地和生产环境中体验 AI、自动补全和即时反馈功能。

廷克威尔
Shift 标志

转移

还在运行旧版本的 Laravel?立即实现 Laravel 自动升级和代码现代化,让您的应用程序保持最新状态。

转移
绝不妥协标志

绝不妥协

来自 No Compromises 播客的两位经验丰富的开发者 Joel 和 Aaron 现在可以为您的 Laravel 项目提供服务。⬧ 固定费用 9500 美元/月。⬧ 无冗长的销售流程。⬧ 无需签订合同。⬧ 100% 退款保证。

绝不妥协
Audit Laravel Apps for Security Issues with Checkpoint image

Audit Laravel Apps for Security Issues with Checkpoint

阅读文章
In-Memory Eloquent Models with Truffle image

In-Memory Eloquent Models with Truffle

阅读文章
Detect and Resolve Laravel Schema Drift with MigrAlign image

Detect and Resolve Laravel Schema Drift with MigrAlign

阅读文章
Laravel Cloud Adds Scale-to-Zero and Spending Limits image

Laravel Cloud Adds Scale-to-Zero and Spending Limits

阅读文章
Shift + AI = Fully Automated Laravel Upgrades image

Shift + AI = Fully Automated Laravel Upgrades

阅读文章
Laracon AU 2026 Announces Full Speaker Lineup, Schedule, and Workshops image

Laracon AU 2026 Announces Full Speaker Lineup, Schedule, and Workshops

阅读文章