Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fsockopen: anticipate on PHP 8.4 deprecation of stream_context_set_option() overloaded signature #822

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 14, 2023

PHP 8.4 will deprecate the two parameter signature of the stream_context_set_option() function.
PHP 8.3 will introduce a replacement function stream_context_set_options() (take note of the s at the end!) for the two parameter signature.

This commit adds a toggle to the Fsockopen::request() method to call the correct PHP function based on its availability.

Refs:

…ption()` overloaded signature

PHP 8.4 will deprecate the two parameter signature of the `stream_context_set_option()` function.
PHP 8.3 will introduce a replacement function `stream_context_set_options()` (take note of the `s` at the end!) for the two parameter signature.

This commit adds a toggle to the `Fsockopen::request()` method to call the correct PHP function based on its availability.

Refs:
* https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#stream_context_set_option
* https://www.php.net/stream_context_set_option
* (docs for the new function are not yet available)
@jrfnl
Copy link
Member Author

jrfnl commented Aug 14, 2023

Note: codecov not hitting the mark is expected as the PHP 8.3 build is not being uploaded to codecov (this will be changed once PHP 8.3 is released).

@schlessera schlessera merged commit fd5eb3e into develop Sep 11, 2023
@schlessera schlessera deleted the feature/fsockopen-php-83-84-stream_context_set_option branch September 11, 2023 07:46
@jrfnl jrfnl mentioned this pull request Mar 25, 2024
7 tasks
@jrfnl jrfnl modified the milestones: 2.1.0, 2.0.11 Aug 18, 2024
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.

2 participants