Skip to content

[pull] master from php:master#103

Merged
pull[bot] merged 8 commits into
dolfly:masterfrom
php:master
Aug 1, 2025
Merged

[pull] master from php:master#103
pull[bot] merged 8 commits into
dolfly:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Aug 1, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

iluuu1994 and others added 8 commits August 1, 2025 00:35
* PHP-8.3:
  Fix circumvented type check with return by ref + finally
* PHP-8.4:
  Fix circumvented type check with return by ref + finally
* Add SAPI_HEADER_DELETE_PREFIX operation

The session ext currently munges into the linked list of headers
itself, because the delete header API is given the key for headers to
delete. The session ext wants to use a prefix past the colon separator,
for i.e. "Set-Cookie: PHPSESSID=", to eliminate only the specific cookie
rather than all cookies.

This changes the SAPI code to add a new header op to take a prefix
instead. Call sites are yet unchanged. Also fix some whitespace.

* Simplify cookie setting code in ext/session

Use the modern SAPI header ops API, including the remove prefix op we
just added.

* [ci skip] Remove redundant and unnecessary comment

The purpose of this is clear, and after refactoring, the special case is
no longer there, so it has no value.

* Un-deprecate simple add/replace header API, use it

Suggestion from Jakub.

* Restore the optimization removing session cookies had

I don't think this needs to be special cased with the parameter.

* Move setting header length to caller

Suggestion from Jakub.

* [ci skip] adjust tab count

It may be better to use spaces in here instead.

* Use session_cookie_len rather than calling strlen
Forgotten by yours truly in 36ae82b

[skip ci]
@pull pull Bot locked and limited conversation to collaborators Aug 1, 2025
@pull pull Bot added the ⤵️ pull label Aug 1, 2025
@pull pull Bot merged commit 6f630a8 into dolfly:master Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants