Open mbroadhead opened 10 months ago
It seems a bit inconsistent that when batch_size=1, PostHog::alias() returns a raw JSON string, while when batch_size > 1 PostHog::alias() returns a boolean. Is this expected behavior?
Example:
# When batch_size > 1 use Str; use PostHog\PostHog; $uuid = Str::uuid(); $key = config('services.posthog.api_key'); $host = config('services.posthog.api_host'); PostHog::init($key, ['host' => $host, 'batch_size' => 7]); var_dump(PostHog::alias(["distinctId" => "user-$uuid", "alias" => "guest-$uuid"])); bool(true) # When batch_size == 1 use Str; use PostHog\PostHog; $uuid = Str::uuid(); $key = config('services.posthog.api_key'); $host = config('services.posthog.api_host'); PostHog::init($key, ['host' => $host, 'batch_size' => 1]); var_dump(PostHog::alias(["distinctId" => "user-$uuid", "alias" => "guest-$uuid"])); string(13) "{"status": 1}"
I'm using posthog-php version 3.0.8.
It seems a bit inconsistent that when batch_size=1, PostHog::alias() returns a raw JSON string, while when batch_size > 1 PostHog::alias() returns a boolean. Is this expected behavior?
Example:
I'm using posthog-php version 3.0.8.