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

Requests: set default options as a constant #539

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 17, 2021

These values do not change during the request, so should be a constant and as the minimum PHP version is now PHP 5.6, we can use constant scalar expressions and constant arrays in constants.

Note: as this class is not final, I'm using static for the option defaults, but for security purposes, using self for the call to get_certificate_path().
👉🏻 Should the Requests::get_certificate_path() method be made final ?

Part of a PR series to address #513

These values do not change during the request, so should be a constant and as the minimum PHP version is now PHP 5.6, we can use constant scalar expressions and constant arrays in constants.
@jrfnl jrfnl added this to the 2.0.0 milestone Sep 17, 2021
@schlessera schlessera merged commit 252934c into develop Sep 17, 2021
@schlessera schlessera deleted the feature/513-5-default-options branch September 17, 2021 09:37
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