Skip to content

ext/curl: Deprecate the NTLM_WB constants#22691

Open
GrahamCampbell wants to merge 1 commit into
php:masterfrom
GrahamCampbell:curl-deprecate-ntlm-wb
Open

ext/curl: Deprecate the NTLM_WB constants#22691
GrahamCampbell wants to merge 1 commit into
php:masterfrom
GrahamCampbell:curl-deprecate-ntlm-wb

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

libcurl removed NTLM_WB support in 8.8.0, so on any current libcurl the CURLAUTH_NTLM_WB bit is silently filtered out of CURLOPT_HTTPAUTH/CURLOPT_PROXYAUTH masks and the CURL_VERSION_NTLM_WB feature bit is never set; only builds against libcurl older than 8.8.0 can still use the feature at all.

This deprecates both constants with #[\Deprecated], following the CURLOPT_BINARYTRANSFER precedent from PHP 8.4, so code still referencing NTLM_WB is nudged to drop it. The NTLMWB key in curl_version()['feature_list'] is kept and continues to report false at runtime. This is also a first step in preparing for curl's scheduled removal of NTLM support altogether in September 2026 (https://curl.se/dev/deprecate.html); the still-functional CURLAUTH_NTLM and CURL_VERSION_NTLM constants are intentionally left alone.

@devnexen

Copy link
Copy Markdown
Member

to note.

@GrahamCampbell

Copy link
Copy Markdown
Contributor Author

Thanks for triage. Yep, I'm aware the minimum cURL version is 7.61.0, and this is only deprecating and not removing at this point. NTLM as an auth standard is also deprecated by Microsoft and has known bugs in the cURL implementation that will never be fixed, because they plan to remove it rather than spend the time making it perfect. I'd also plan to send a PR targetting PHP 8.7 to deprecate the remaining constants. Given that this requires an RFC, maybe the better thing to do would be to target PHP 8.7 with the whole bucket, instead of splitting?

@GrahamCampbell GrahamCampbell force-pushed the curl-deprecate-ntlm-wb branch from 0cb8d20 to 26ea5e1 Compare July 12, 2026 17:48
@GrahamCampbell GrahamCampbell force-pushed the curl-deprecate-ntlm-wb branch from 26ea5e1 to a294d3e Compare July 12, 2026 21:06
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.

3 participants