Repository navigation
0.3: drop PHP 8.5 deprecations from the native transports - #2
Merged
Merged
Conversation
curl_close() is deprecated in PHP 8.5 and has had no effect since 8.0, so every cURL render and purge logged a deprecation. The streams fallback now reads the response headers from stream_get_meta_data() instead of the deprecated $http_response_header. New transport tests run both paths against php -S and fail on deprecations.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NativeSsrTransportandNativeSsrPurgeTransportno longer callcurl_close()(deprecated in PHP 8.5, no effect since 8.0). Hosts on 8.5 logged it on every cURL render and purge.stream_get_meta_data()['wrapper_data']instead of$http_response_header(deprecated in PHP 8.5). The same code runs on PHP 8.2–8.5.NativeTransportsTestruns both transports over cURL and streams againstphp -S.phpunit.xmlnow fails on deprecations, so CI on 8.5 catches this kind of issue.0.3.xis a new maintenance branch at thev0.3.0commit. It is for a0.3.1patch, because hosts on^0.3cannot take the breaking 0.4 changes onmain.mainalready dropscurl_close(). Read stream response headers from the stream metadata #3 removes$http_response_headerthere.No API change.
Test plan
composer test(29 tests) on PHP 8.2.35 and 8.5.12v0.3.0sources, the new tests fail on 8.5 with thecurl_close()deprecationphp -d error_reporting=E_ALL -lis clean for the whole package on 8.2.35, 8.5.4 and 8.5.12