Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getsentry/sentry-php
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: da685367d795a0262df0a204f0c56a39d0b1a89d
Choose a base ref
..
head repository: getsentry/sentry-php
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 94d93e2b587aba7e8b33bac1adbbcceaecbefaf7
Choose a head ref
Showing with 5 additions and 9 deletions.
  1. +0 −8 .php-cs-fixer.dist.php
  2. +5 −1 src/HttpClient/HttpClient.php
8 changes: 0 additions & 8 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -33,14 +33,6 @@
'method' => 'multi',
'property' => 'multi',
],
'native_function_invocation' => [
'include' => [
'@compiler_optimized',
'curl_init',
],
'scope' => 'namespaced',
'strict' => true,
],
])
->setRiskyAllowed(true)
->setFinder(
6 changes: 5 additions & 1 deletion src/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
@@ -40,7 +40,11 @@ public function sendRequest(Request $request, Options $options): Response
throw new \RuntimeException('The request data is empty.');
}

$curlHandle = \curl_init();
if (!\extension_loaded('curl')) {
throw new \RuntimeException('The cURL PHP extension must be enabled to use the HttpClient.');

Check warning on line 44 in src/HttpClient/HttpClient.php

Codecov / codecov/patch

src/HttpClient/HttpClient.php#L44

Added line #L44 was not covered by tests
}

$curlHandle = curl_init();

$requestHeaders = Http::getRequestHeaders($dsn, $this->sdkIdentifier, $this->sdkVersion);