Download the PHP package symplify-conversion/sst-sdk-php without Composer
On this page you can find all versions of the php package symplify-conversion/sst-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symplify-conversion/sst-sdk-php
More information about symplify-conversion/sst-sdk-php
Files in symplify-conversion/sst-sdk-php
Package sst-sdk-php
Short Description SDK for Symplify Conversion Server-Side Testing
License MIT
Informations about the package sst-sdk-php
Symplify Server-Side Testing SDK for PHP
This is the PHP implementation of the Symplify Server-Side Testing SDK.
Due to the PHP concurrency model, the SDK is not keeping its own local cache for the config, there simply is no great way to organize the invalidation logic when the purpose of the caching is to keep the hot path fast.
Instead, we recommend you configure the HTTP client (can be injected to the SDK) to do HTTP caching. See Usage below.
Changes
See CHANGELOG.md
Requirements
Installing
Add the dependency through composer:
Usage
Note that with the curl HTTP client you get no local caching, and thus depend on our CDN for each request. You can use any HTTP client compatible with PSR-17 and PSR-18 instead of curl, and leverage their caching features. This is of course a bit more involved:
See more examples of code using the SDK in examples.
Cookies
To ensure visitors get the same variation consistently, the SDK needs to read and write cookies. See SST-documentation repository for general cookie setup information and examples folder for code examples.
If you do not have a CookieJar class already, it is advised to use the SymplifyConversion\SSTSDK\Cookies\DefaultCookieJar class.
Custom audience
It's possible to limit for which requests/visitors a certain test project should apply by using "audience" rules. See Audiences.md for details.
The audience is evaluated when your server calls findVariation
, and if the
rules you have setup in the audience references "custom attributes" your
server must provide the values of these attributes for each request.
For example, you might want a test project to only apply for visitors from a certain country. The audience can be configured in your project, using a custom attribute "country", and then your server provides it when finding the variation on each request:
SDK Development
See RELEASING.md.
All versions of sst-sdk-php with dependencies
ext-curl Version *
ext-json Version *
psr/http-client Version ^1.0.1
psr/http-factory Version ^1.0.1
psr/log Version ^1.1.4