Laravel 13.40.0 업데이트
릴리스: 2026년 11월 4일
평가: 2026년 11월 7일
Laravel 13.40.0은 마이너 릴리스로, 데이터베이스(MySQL/MariaDB, PostgreSQL, SQL Server, SQLite) 관련 버그 수정이 다수이고 Queue::whenJobRunsLongerThan, Schedule::whenTaskRunsLongerThan, $middleware->insertBefore()/insertAfter() 등 신규 기능이 추가되었습니다. 특히 Concurrency 프로세스 결과 envelope를 인증해 작업 출력 주입(Task Output Injection)을 막는 보안 수정(#62297)이 포함되어 있으므로, Concurren...
예상되는 하위 호환성 문제
- 트랜잭션 중 연결이 끊긴 경우 재연결 동작 추가심각도 보통
릴리스 노트의 "Reconnect after losing the connection during a transaction"(#62211)는 트랜잭션 중 연결 유실 시 재연결하도록 바꿉니다. 노트에는 PR 제목만 있어 세부 동작은 확인할 수 없으므로, 연결 유실 처리나 트랜잭션 재시도에 의존하는 코드가 있다면 동작 변화를 점검해야 합니다.
영향 범위: DB::transaction() 안에서 연결 오류를 직접 잡아 재시도하는 코드, 장시간 트랜잭션
- 중첩 트랜잭션의 동시성 오류 시 savepoint로 롤백심각도 보통
"Roll back to savepoint on concurrency errors in nested transactions"(#62248)에 따라 중첩 트랜잭션에서 동시성 오류(예: 데드락류)가 발생하면 savepoint로 롤백합니다. 기존 예외 처리 흐름이 달라질 수 있으나, 구체적 영향은 노트에서 확인되지 않습니다.
영향 범위: 중첩 DB::transaction() 및 데드락 재시도 로직
- createOrFirst 조회가 write 커넥션 사용심각도 낮음
"Use the write connection in BelongsToMany createOrFirst lookup"(#62223)로 BelongsToMany의 createOrFirst 조회가 write 커넥션을 사용합니다. 읽기/쓰기 분리 환경에서 조회 대상 커넥션이 바뀝니다.
영향 범위: read/write 커넥션을 분리해 쓰면서 BelongsToMany::createOrFirst를 호출하는 코드
- 페이지네이션 계약·links() 반환 타입 수정심각도 낮음
"Fix Paginator::links() return type"(#62226)과 "Fix pagination contracts render() return type"(#62242)는 반환 타입을 고칩니다. 페이지네이터 계약을 직접 구현하거나 상속한 커스텀 클래스에서 시그니처 호환성 오류가 날 가능성이 있으나, 노트에 상세 설명은 없습니다.
영향 범위: Paginator/LengthAwarePaginator 계약을 직접 구현·확장한 커스텀 페이지네이터
패키지 관리자가 확인할 것
- laravel/horizon위험도 낮음
큐 관련 변경(Queue::whenJobRunsLongerThan 추가, queue:work 출력에서 released 작업 표시, 실패한 배치 작업 기록)이 포함됩니다. Horizon 대시보드에서 released/실패 배치 표시가 기대와 같은지 스테이징에서 확인하세요.
- illuminate/queue위험도 낮음
Queue::whenJobRunsLongerThan 추가와 "Record failed batch jobs when the model is missing"(#62280) 수정이 이 패키지 영역입니다. 배치 실패 기록 방식에 의존하는 모니터링이 있다면 확인하세요.
- laravel/octane위험도 낮음
Concurrency 보안 수정(#62297)이 포함되어 있습니다. Octane 환경에서 Concurrency 기능을 쓴다면 업데이트 후 동작을 확인하세요. 노트에 Octane 직접 언급은 없습니다.
- illuminate/http위험도 낮음
Cookie::queue()의 named arguments 수정(#62246)과 ImageFile::default() 규칙 수정(#62244)은 HTTP/검증 계층 변경입니다. 해당 API를 쓰는 경우에만 확인하면 됩니다.
대응 체크리스트
- Concurrency 사용 여부 점검 후 우선 업데이트즉시
코드에서 Concurrency::run 또는 Concurrency 파사드 사용 여부를 검색하세요(예: grep -rn "Concurrency::" app/). 사용 중이면 보안 수정(#62297)이 포함된 13.40.0으로 composer update laravel/framework 를 우선 진행하세요.
- DB 트랜잭션·재연결 동작 스테이징 검증가까운 시일
트랜잭션 재연결(#62211), savepoint 롤백(#62248)이 포함되어 있으므로 트랜잭션·재시도 로직의 테스트를 실행하고 스테이징에서 확인한 뒤 운영에 반영하세요.
- SQL Server·PostgreSQL·MySQL 사용 시 마이그레이션 확인가까운 시일
SQL Server의 컬럼 삭제 시 check constraint 제거(#62222), PostgreSQL 인덱스 스키마 한정(#62213), MySQL/MariaDB JSON 경로 배열 업데이트(#62225) 수정이 있습니다. 해당 DB 사용 시 마이그레이션과 JSON 업데이트 쿼리를 테스트 DB에서 실행해 보세요.
- 신규 기능 도입 검토선택
Queue::whenJobRunsLongerThan, Schedule::whenTaskRunsLongerThan, $middleware->insertBefore()/insertAfter(), $middleware->replace() 배열 지원은 선택적으로 도입할 수 있습니다.
자동 생성상세 평가
요약
Laravel 13.40.0은 13.x 마이너 릴리스입니다. 데이터베이스 드라이버별 버그 수정이 많고, 장시간 실행 큐 작업·스케줄 작업 감지 훅과 미들웨어 삽입 헬퍼가 추가되었습니다. 또한 Concurrency 프로세스 결과 envelope를 인증해 작업 출력 주입을 막는 보안 수정(#62297)이 포함되어 있어, Concurrency를 쓰는 앱은 우선 업데이트 대상입니다.
주요 변경
- 보안: Concurrency 프로세스 결과 envelope 인증으로 Task Output Injection 방지 (#62297)
- 신규: Queue::whenJobRunsLongerThan (#62141), Schedule::whenTaskRunsLongerThan (#62233), $middleware->insertBefore()/insertAfter() (#62261), $middleware->replace() 배열 지원 (#62230), 다른 서버에서 이미 실행된 작업에 대한 ScheduledTaskSkipped 이벤트 (#62256), InteractsWithData strict 플래그 (#62254)
- DB: 트랜잭션 중 연결 유실 후 재연결 (#62211), 중첩 트랜잭션 savepoint 롤백 (#62248), MySQL/MariaDB JSON 경로 업데이트 수정 (#62225), SQL Server check constraint·orderBy·withExists 수정 (#62222, #62239, #62273), PostgreSQL 인덱스 스키마 한정·full text 언어 추가 (#62213, #62210), SQLite forceIndex 수정 (#62255), cursorPaginate union 수정 (#62272)
- 기타 수정: Redis 태그 캐시 flush 블로킹 (#62215), 암호화 Pusher 다중 채널 브로드캐스트 (#62279), Str::remove/Str::substrCount 수정 (#62278, #62277), JSON:API 리소스 컬렉션 및 toResourceCollection 수정 (#62299, #62266), 실패한 배치 작업 기록 (#62280), Cookie::queue named arguments (#62246), ImageFile::default() (#62244)
- 내부/문서/테스트: CI 의존성 갱신, KeyGenerateCommand 도움말, CommandSignatureTest 수정 등은 애플리케이션 대응이 필요 없습니다.
하위 호환성
마이너 릴리스이며 릴리스 노트에 명시적인 breaking change 표기는 없습니다. 다만 트랜잭션 재연결(#62211), 중첩 트랜잭션 savepoint 롤백(#62248), BelongsToMany createOrFirst의 write 커넥션 사용(#62223), 페이지네이션 계약 반환 타입 수정(#62226, #62242)은 기존 동작이나 시그니처가 달라질 수 있는 변경입니다. 노트에 PR 제목만 있어 세부 영향은 확인되지 않았으므로 해당 기능을 쓰는 경우에만 테스트로 확인하세요.
패키지 관리자가 확인할 것
- laravel/horizon, illuminate/queue: 큐 훅 추가, released 작업 출력, 실패 배치 기록 변경이 모니터링 표시에 영향을 주는지 확인
- laravel/octane: Concurrency 보안 수정 반영 후 동작 확인
- illuminate/http: Cookie::queue()와 ImageFile::default() 수정 사용처 확인
- 페이지네이터 계약을 직접 구현한 패키지: 반환 타입 시그니처 호환성 확인
- 그 외 등록 패키지에 대한 직접 영향은 릴리스 노트에서 확인되지 않음
대응 체크리스트
- Concurrency 사용 여부 검색 (immediate) 후 사용 시 13.40.0으로 업데이트
- 트랜잭션·재시도 로직 테스트 실행 (soon)
- SQL Server/PostgreSQL/MySQL 사용 시 마이그레이션·JSON 업데이트 쿼리 검증 (soon)
- 커스텀 페이지네이터가 있으면 시그니처 확인 (soon)
- 신규 큐·스케줄·미들웨어 헬퍼 도입 검토 (optional)
GitHub 릴리스 노트를 근거로 언어 모델 (external-agent)이 작성했으며, 사람이 검수하지 않았습니다. 실제 적용 전에는 공식 릴리스 노트와 업그레이드 가이드를 함께 확인하세요.
GitHub 원문 릴리스 노트 보기
- [13.x] Fix Paginator::links() return type by @dhrupo in https://github.com/laravel/framework/pull/62226
- [13.x] Fix updating JSON paths with arrays and collections on MySQL and MariaDB by @xurshudyan in https://github.com/laravel/framework/pull/62225
- [13.x] Use the write connection in BelongsToMany createOrFirst lookup by @xurshudyan in https://github.com/laravel/framework/pull/62223
- [13.x] Drop check constraints when dropping columns on SQL Server by @xurshudyan in https://github.com/laravel/framework/pull/62222
- [13.x] Centralize + improve tests for
InteractsWithDataby @inxilpro in https://github.com/laravel/framework/pull/62217 - [13.x] Fix Redis tagged cache flush blocking Redis when flushing many tags by @MohannadElemary in https://github.com/laravel/framework/pull/62215
- [13.x] Qualify dropped and renamed indexes with the table schema on PostgreSQL by @xurshudyan in https://github.com/laravel/framework/pull/62213
- [13.x] Reconnect after losing the connection during a transaction by @xurshudyan in https://github.com/laravel/framework/pull/62211
- [13.x] Add missing PostgreSQL full text languages by @xurshudyan in https://github.com/laravel/framework/pull/62210
- [13.x] Add Queue::whenJobRunsLongerThan by @jackbayliss in https://github.com/laravel/framework/pull/62141
- [13.x] Fix named arguments in Cookie::queue() by @xurshudyan in https://github.com/laravel/framework/pull/62246
- [13.x] Fix ImageFile::default() returning a plain File rule by @Marzaan in https://github.com/laravel/framework/pull/62244
- [13.x] Fix pagination contracts render() return type by @dhrupo in https://github.com/laravel/framework/pull/62242
- [13.x] Fix SQL Server ignoring orderBy on update and delete with limit by @xurshudyan in https://github.com/laravel/framework/pull/62239
- [13.x] Preserve error_get_last() for suppressed errors by @xurshudyan in https://github.com/laravel/framework/pull/62228
- Prepare reusable development environments for Amp orbs by @DGarbs51 in https://github.com/laravel/framework/pull/62231
- Allow
$middleware->replace()to accept an array of replacements by @ziadoz in https://github.com/laravel/framework/pull/62230 - [13.x] Show released jobs as released in queue:work output by @jackbayliss in https://github.com/laravel/framework/pull/62180
- Add
$middleware->insertBefore()and$middleware->insertAfter()helper methods by @ziadoz in https://github.com/laravel/framework/pull/62261 - [13.x] Reconnect the Cloud log socket after a failed write by @jamesdangercarpenter in https://github.com/laravel/framework/pull/62258
- [13.x] Dispatch
ScheduledTaskSkippedwhen a task already ran on another server by @jackbayliss in https://github.com/laravel/framework/pull/62256 - [13.x] Fix forceIndex() generating invalid SQL on SQLite for PRIMARY and multiple indexes by @tharlei in https://github.com/laravel/framework/pull/62255
- [13.x] Add Schedule::whenTaskRunsLongerThan by @jackbayliss in https://github.com/laravel/framework/pull/62233
- [13.x] Roll back to savepoint on concurrency errors in nested transactions by @xurshudyan in https://github.com/laravel/framework/pull/62248
- [13.x] Fix
toResourceCollection()on filtered collections by @xurshudyan in https://github.com/laravel/framework/pull/62266 - Fix lazily loaded images not being freed until garbage collection by @tamc in https://github.com/laravel/framework/pull/62265
- Bump stefanzweifel/git-auto-commit-action from 7.2.0 to 7.2.1 in the github-actions group by @dependabot[bot] in https://github.com/laravel/framework/pull/62288
- KeyGenerateCommand: improve help message about '--show' by @valerio-bozzolan in https://github.com/laravel/framework/pull/62286
- [13.x] Record failed batch jobs when the model is missing by @xurshudyan in https://github.com/laravel/framework/pull/62280
- [13.x] Fix broadcasting to multiple encrypted Pusher channels by @xurshudyan in https://github.com/laravel/framework/pull/62279
- [13.x] Fix Str::remove() rejecting a Traversable subject by @Amirhf1 in https://github.com/laravel/framework/pull/62278
- [13.x] Fix Str::substrCount() treating offset and length as bytes by @Amirhf1 in https://github.com/laravel/framework/pull/62277
- [13.x] Fix
withExists()andloadExists()on SQL Server by @xurshudyan in https://github.com/laravel/framework/pull/62273 - [13.x] Fix
cursorPaginate()columns on union queries with multiple orders by @xurshudyan in https://github.com/laravel/framework/pull/62272 - [13.x] Fix @param types wider than the native parameter type by @dhrupo in https://github.com/laravel/framework/pull/62271
- [13.x] Detect QueryList.TerminateAll() as lost connection by @jackbayliss in https://github.com/laravel/framework/pull/62270
- [13.x] Add a
strictflag toInteractsWithDataby @inxilpro in https://github.com/laravel/framework/pull/62254 - [13.x] database fundamentals to know if a read connection has catched up to a write connection by @tpetry in https://github.com/laravel/framework/pull/62198
- [13.x] Fix CommandSignatureTest by @jackbayliss in https://github.com/laravel/framework/pull/62295
- [13.x] Fix JSON:API resource collections wrapping plain objects by @lazerg in https://github.com/laravel/framework/pull/62299
- [13.x] Fix: Authenticate the Concurrency Process Result Envelope to Prevent Task Output Injection by @Arr0way in https://github.com/laravel/framework/pull/62297