Releases: wingify/vwo-fme-php-sdk
Version 1.21.1
Fixed minor issue with trackEvent() and setAttribute()
Version 1.21.0
Added
- Added support to use the context
idas the visitor UUID instead of auto-generating one. You can read the visitor UUID from the flag result viaflag->getUUID()(e.g. to pass to the web client).use vwo\VWO; $vwoClient = VWO::init([ 'accountId' => '123456', 'sdkKey' => '32-alpha-numeric-sdk-key', ]); // Default: SDK generates a UUID from id and account $contextWithGeneratedUuid = ['id' => 'user-123']; $flag1 = $vwoClient->getFlag('feature-key', $contextWithGeneratedUuid); // Use your web client UUID by passing it in context.id $contextWithWebUuid = [ 'id' => 'D7E2EAA667909A2DB8A6371FF0975C2A5' // your existing UUID ]; $flag2 = $vwoClient->getFlag('feature-key', $contextWithWebUuid); // Get the UUID from the flag result (e.g. to pass to web client) $uuid = $flag1->getUUID(); echo 'Visitor UUID: ' . $uuid;
Version 1.20.0
Enhanced Logging capabilities at VWO by sending vwo_sdkDebug event with additional debug properties.
Version 1.19.0
- Added support for redirecting all network calls through a custom proxy URL. This feature allows users to route all SDK network requests (settings, tracking, etc.) through their own proxy server.
Version 1.18.0
Added
-
Added session management capabilities to enable integration with VWO's web client testing campaigns. The SDK now automatically generates and manages session IDs to connect server-side feature flag decisions with client-side user sessions.
Example usage:
use vwo\VWO; $options = [ 'sdkKey' => '32-alpha-numeric-sdk-key', 'accountId' => '123456', ]; $vwoClient = VWO::init($options); // Session ID is automatically generated if not provided $context = ['id' => 'user-123']; $flag = $vwoClient->getFlag('feature-key', $context); // Access the session ID to pass to web client for session recording $sessionId = $flag->getSessionId(); echo "Session ID for web client: " . $sessionId;
You can also explicitly set a session ID to match a web client session:
use vwo\VWO; $vwoClient = VWO::init($options); $userContext = [ 'id' => 'user-123', 'sessionId' => 1697123456 // Custom session ID matching web client ]; $flag = $vwoClient->getFlag('feature-key', $userContext);
This enhancement enables seamless integration between server-side feature flag decisions and client-side session recording, allowing for comprehensive user behavior analysis across both server and client environments.
Version 1.17.0
Added
- Added support for configurable ANSI color output in logging. ANSI colors in logging are now only applied when
isAnsiColorEnabledis set totruein the logger configuration.
Example:
$vwoClient = VWO::init([
'accountId' => '123456',
'sdkKey' => '32-alpha-numeric-sdk-key',
'logger' => [
'level' => 'DEBUG',
'isAnsiColorEnabled' => true, // Enable colored log levels in terminal
],
]);- Added support for configurable settings expiry and network timeout through
settingsConfigoption. The SDK now allows customization of settings cache expiration and network timeout for settings fetch requests.
Example:
$vwoClient = VWO::init([
'accountId' => '123456',
'sdkKey' => '32-alpha-numeric-sdk-key',
'settingsConfig' => [
'timeout' => 50000, // Network timeout for settings fetch in milliseconds (default: 50000)
],
]);Version 1.16.0
Fixed singleton class issue where single service instance was being used across multiple sdk instances
Version 1.15.0
Added batch event processing to optimize network calls during GetFlag operations. Multiple impression events are now collected and sent in a single batch request
Version 1.14.0
Fixed GET requests (settings calls) to always use cURL instead of sockets for improved reliability.
Version 1.13.0
Added
- Introduced option to send network calls synchronously with the introduction of a new parameter in init,
shouldWaitForTrackingCalls. - Added
retryConfiginit parameter to configure retries:shouldRetry,maxRetries,initialDelay,backoffMultiplier.
Example:
$vwoClient = VWO::init([
'accountId' => '123456',
'sdkKey' => '32-alpha-numeric-sdk-key',
'shouldWaitForTrackingCalls' => true, // switch to synchronous (cURL) tracking
'retryConfig' => [
'shouldRetry' => true, // default: true
'maxRetries' => 3, // default: 3
'initialDelay' => 2, // seconds; default: 2
'backoffMultiplier' => 2, // delays: 2s, 4s, 8s; default: 2
],
]);
// If you want synchronous calls without retries
$vwoClient = VWO::init([
'accountId' => '123456',
'sdkKey' => '32-alpha-numeric-sdk-key',
'shouldWaitForTrackingCalls' => true,
'retryConfig' => [
'shouldRetry' => false,
],
]);