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

Make timeout configurable #44

Merged
merged 10 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public function __construct(string $apiKey, array $options = [], ?HttpClient $ht
$options['ssl'] ?? true,
(int) ($options['maximum_backoff_duration'] ?? 10000),
false,
$options["debug"] ?? false
$options["debug"] ?? false,
null,
liyiy marked this conversation as resolved.
Show resolved Hide resolved
(int) ($options['timeout'] ?? 10000)
);
$this->featureFlags = [];
$this->groupTypeMapping = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(
bool $compressRequests = false,
bool $debug = false,
?Closure $errorHandler = null,
int $curlTimeoutMilliseconds = 750
int $curlTimeoutMilliseconds = 10000
) {
$this->host = $host;
$this->useSsl = $useSsl;
Expand Down
2 changes: 1 addition & 1 deletion lib/PostHog.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class PostHog
{
public const VERSION = '3.0.2';
public const VERSION = '3.0.3';
public const ENV_API_KEY = "POSTHOG_API_KEY";
public const ENV_HOST = "POSTHOG_HOST";

Expand Down