parse-community / parse-php-sdk

The PHP SDK for Parse Platform
https://parseplatform.org/
Other
812 stars 346 forks source link

feat: Allow http options to be passed into `ParseClient` #513

Closed dplewis closed 1 year ago

dplewis commented 1 year ago

New Pull Request Checklist

Issue Description

There are a lot of options and features available to the http clients but we are unable to use them. This PR will allow the developer to control the http transport layer. The main goal was to get certificate pinning working on a self signed tls enabled server.

ParseClient::setHttpOptions($options)

Curl Options: https://www.php.net/manual/en/function.curl-setopt.php Stream Options: https://www.php.net/manual/en/context.php

Closes: https://github.com/parse-community/parse-php-sdk/issues/218

Approach

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this pull request!

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (77b06f4) 98.60% compared to head (8905ca8) 98.61%.

:exclamation: Current head 8905ca8 differs from pull request most recent head 86be59a. Consider uploading reports for the commit 86be59a to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #513 +/- ## ========================================= Coverage 98.60% 98.61% - Complexity 1062 1068 +6 ========================================= Files 38 38 Lines 3229 3241 +12 ========================================= + Hits 3184 3196 +12 Misses 45 45 ``` | [Impacted Files](https://app.codecov.io/gh/parse-community/parse-php-sdk/pull/513?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community) | Coverage Δ | | |---|---|---| | [src/Parse/HttpClients/ParseCurlHttpClient.php](https://app.codecov.io/gh/parse-community/parse-php-sdk/pull/513?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-c3JjL1BhcnNlL0h0dHBDbGllbnRzL1BhcnNlQ3VybEh0dHBDbGllbnQucGhw) | `95.60% <100.00%> (+0.09%)` | :arrow_up: | | [src/Parse/HttpClients/ParseStreamHttpClient.php](https://app.codecov.io/gh/parse-community/parse-php-sdk/pull/513?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-c3JjL1BhcnNlL0h0dHBDbGllbnRzL1BhcnNlU3RyZWFtSHR0cENsaWVudC5waHA=) | `96.38% <100.00%> (+0.28%)` | :arrow_up: | | [src/Parse/ParseClient.php](https://app.codecov.io/gh/parse-community/parse-php-sdk/pull/513?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-c3JjL1BhcnNlL1BhcnNlQ2xpZW50LnBocA==) | `95.31% <100.00%> (+0.08%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

mtrezza commented 1 year ago

Rerunning the CI because PHP 8.1 failed

parseplatformorg commented 1 year ago

🎉 This change has been released in version 2.2.0