Repository navigation
Merge Guzzle 8.3.1 cookie fixes - #3
Conversation
Merge release 7d9b1f4, including guzzle/guzzle PRs guzzle#3987, guzzle#3990, guzzle#3991 and guzzle#3994. Expired cookies now remove matching stored cookies. Same-value cookies replace old entries when their expiry or flags change. Restoring Max-Age cookies from persisted data preserves their original expiry, while Set-Cookie headers retain Max-Age precedence. The delayed-request regression measures attachment separately from response completion so a pending sibling cannot make its timing assertion flaky. Preserve the fork-specific coroutine ownership, pooled handlers, global middleware and idle-handle settings without conflict resolutions or additional source changes. Validated each affected cookie test file, session-cookie loading and the complete CurlMultiHandler test file. PHPStan, PHP-CS-Fixer, Composer normalization and platform checks pass.
Walkthrough
Merge Risk:
|
|
@coderabbitai review |
PR Summary by QodoMerge Guzzle 8.3.1 cookie fixes and timing-test correction
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
|
@cubic-dev-ai review |
@binaryfire cubic can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 123,074 of the 120,000 allowed lines of code this month. Reviews resume on 10 November 2026 (in 14 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
There was a problem hiding this comment.
🔇 Additional comments: 1
tests/Handler/CurlMultiHandlerTest.php-331-331: 1
331-331:Major · Functional Correctness · Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Measure attachment before post-attachment select processing.
The loop checks
delaysonly aftertick()returns.tickFor()removes the
due entry before its latercurl_multi_select()call. With the 5-second
sibling timeout, the sametick()can emptydelaysand then wait for the
sibling.$elapsedtherefore includes time after attachment, so the
< 2.5assertion can fail even when attachment was prompt.Observe attachment before select processing, or remove this timing assertion
from the manual-tick test.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
39701e10-1554-4eda-b7e6-a177d1279047
Files selected for processing: 8-
CHANGELOG.mdUPGRADING.mdsrc/Cookie/CookieJar.phpsrc/Cookie/SetCookie.phptests/Cookie/CookieJarTest.phptests/Cookie/FileCookieJarTest.phptests/Cookie/SetCookieTest.phptests/Handler/CurlMultiHandlerTest.php
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
|
|
The attachment-timing concern in the review does not apply to this test's fresh-connection setup. The handler starts without shared or idle connections, and the only existing HTTP/1.1 connection is occupied by the stalled sibling. The delayed request must open a new TCP connection; the attachment tick's select observes that connection becoming ready. The long sibling-only select occurs on a later tick that processes an already-buffered response. The revised loop stops before timing that tick, then waits for the response separately. This preserves the regression assertion without adding test instrumentation or changing production code. The affected suite and the PHP-version CI jobs pass. The imported changelog retains upstream formatting. No documentation changes are needed solely to meet a docstring-coverage percentage. |
This merges upstream Guzzle 8.3.1. It fixes cookie updates that could leave an old cookie active or renew an expired cookie when loading a saved jar.
The merge preserves the fork's coroutine ownership checks, pooled handlers, global middleware and idle-handle settings. No fork-specific source adjustments were needed.
Validation: affected cookie and cURL multi-handler tests, session-cookie loading tests, PHPStan, formatting, Composer normalization and platform checks pass. Existing platform-dependent cURL test skips remain.
Summary by cubic
Merges upstream Guzzle 8.3.1 cookie fixes. Cookie storage now removes expired cookies instead of storing them, and persisted cookies keep their original expiry instead of restarting their lifetime when loaded.
Bug Fixes
Discard,Secure, orHttpOnlyflags change; exact duplicates stay unchanged.Max-Agecookies keep the stored expiry, whileSet-Cookieheader parsing still givesMax-Ageprecedence overExpires.The merge keeps the fork's coroutine ownership checks, pooled handlers, global middleware, and idle-handle settings. No fork-specific source changes were needed.
Written for commit de7f066. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Max-Agetakes precedence overExpires.Documentation
Max-AgeandExpiresbehave for parsed and array-created cookies.