Skip to content

Split streams filter seekability into read and write fields#21878

Open
bukka wants to merge 1 commit intophp:masterfrom
bukka:stream_filter_write_seek
Open

Split streams filter seekability into read and write fields#21878
bukka wants to merge 1 commit intophp:masterfrom
bukka:stream_filter_write_seek

Conversation

@bukka
Copy link
Copy Markdown
Member

@bukka bukka commented Apr 26, 2026

The single seekable field caused write-chain seeks to reset filter state after the bug #49874 fix, breaking dechunk on php://temp (used by Symfony HttpClient).

Split into read_seekable and write_seekable. Write defaults to ALWAYS for stateless and non-buffering filters. Buffer-holding filters (zlib, bz2, convert.*) accept a write_seek_mode parameter: "preserve" (default), "reset", or "strict". Invalid values throw ValueError.

php_user_filter::seek gains a third int $chain argument; the ops seek signature is unchanged.

The single seekable field caused write-chain seeks to reset filter
state after the bug #49874 fix, breaking dechunk on php://temp (used
by Symfony HttpClient).

Split into read_seekable and write_seekable. Write defaults to ALWAYS
for stateless and non-buffering filters. Buffer-holding filters
(zlib, bz2, convert.*) accept a write_seek_mode parameter:
"preserve" (default), "reset", or "strict". Invalid values throw
ValueError.

php_user_filter::seek gains a third int $chain argument; the ops
seek signature is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant