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 jobsattachFromStorage()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
whereDate和whereTimewhen the column is anExpression( #60314 )。 - @PeteBishwhip
made
sole()report aMultipleRecordsFoundException( #60294 )。 - @ErfanMomeniii
更新
isUniqueConstraintError()to catch SQL Server error 2627 ( #60320 )。 - @kieranbrown fixed FIFO queue name normalization in Cloud managed queues ( #60315 )。
- @crynobone
固定的
Illuminate\Http\Responsecompatibility with Symfony 8.1 ( #60318 )。
参考







