{"id":19541301,"url":"https://github.com/wingify/vwo-php-sdk","last_synced_at":"2025-04-09T11:10:57.197Z","repository":{"id":46177710,"uuid":"199624899","full_name":"wingify/vwo-php-sdk","owner":"wingify","description":"[DEPRECATED] VWO PHP SDK for server-side A/B Testing","archived":false,"fork":false,"pushed_at":"2025-03-25T14:10:21.000Z","size":481,"stargazers_count":12,"open_issues_count":2,"forks_count":11,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-02T10:12:03.006Z","etag":null,"topics":["murmurhash3","php","php-sdk","server-side","vwo"],"latest_commit_sha":null,"homepage":"https://developers.vwo.com/docs/fullstack-overview","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wingify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-30T09:56:48.000Z","updated_at":"2025-03-25T14:10:24.000Z","dependencies_parsed_at":"2023-02-08T18:45:37.695Z","dependency_job_id":"5990019f-e554-4874-b19a-bc5e5eb14184","html_url":"https://github.com/wingify/vwo-php-sdk","commit_stats":{"total_commits":91,"total_committers":8,"mean_commits":11.375,"dds":0.6373626373626373,"last_synced_commit":"552160f2ceb23bd7c6f23e8e86cbb1e2d01b870e"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingify","download_url":"https://codeload.github.com/wingify/vwo-php-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027407,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["murmurhash3","php","php-sdk","server-side","vwo"],"created_at":"2024-11-11T03:09:35.945Z","updated_at":"2025-04-09T11:10:57.177Z","avatar_url":"https://github.com/wingify.png","language":"PHP","readme":"# ⚠️ [DEPRECATED] VWO PHP SDK\n\n**⚠️ This project is no longer actively developed. ⚠️**\n\n**✅ We are only fixing critical bugs and security issues.**\n\n**❌ No new features, enhancements, or non-critical updates will be added.**\n\n#### Switch to *VWO Feature Management \u0026 Experimentation(FME)* – The Better Alternative! 🚀\n\nVWO’s FME product empowers teams to seamlessly test, release, optimize, and roll back features across their entire tech stack while minimizing risk and maximizing business impact.\n\n* Check out FME developer documentation [here](https://developers.vwo.com/v2/docs/fme-overview).\n* Check [this](https://developers.vwo.com/v2/docs/sdks-release-info ) for the list of all FME-supported SDKs.\n\n**💡 Need Help?**\nFor migration assistance or any questions, contact us at [support@vwo.com](support@vwo.com)\n\n------\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/vwo/vwo-php-sdk.svg)](https://packagist.org/packages/vwo/vwo-php-sdk) [![CI](https://github.com/wingify/vwo-php-sdk/workflows/CI/badge.svg?branch=master)](https://github.com/wingify/vwo-php-sdk/actions?query=workflow%3ACI) [![Coverage Status](https://coveralls.io/repos/github/wingify/vwo-php-sdk/badge.svg?branch=master)](https://coveralls.io/github/wingify/vwo-php-sdk?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nThis open source library provides you server-side testing capabilities.\n\n## Requirements\n\n\u003e PHP \u003e= 5.6\n\n## Installation\n\nInstall the latest version with\n\n```bash\ncomposer require vwo/vwo-php-sdk\n```\n\n## Basic Usage\n\n**Use the below code for inital setup.**\n\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\nrequire_once('userStorage.php'); // Optional :if you are using UserStorage service feature\nrequire_once('customLogger.php');// Optional :if you are using custom logging feature\n\nuse vwo\\VWO;\n\n$accountId = REPLACE_WITH_VWO_ACCOUNT_ID; // eg: 123456\n$sdkKey = 'REPLACE_WITH_TOKEN'; // eg: can be found in VWO app - FullStack project\n$campaignKey = 'CAMPAIGN_UNIQUE_TEST_KEY';\n$userId = 'USER_ID';\n$goalIdentifier = 'REPLACE_WITH_CAMPAIGN_GOAL_IDENTIFIER';\n\n// to fetch the settings i.e campaigns, variations and goals\n$settingsFile = VWO::getSettingsFile($accountId, $sdkKey);\n\n$sdkConfig = [\n  'settingsFile' =\u003e $settingsFile,\n  'isDevelopmentMode' =\u003e 0,  // optional: 1 to enable the dev mode\n  'logging' =\u003e new CustomLogger(), // optional\n  'userStorageService' =\u003e new userStorageService() // optional\n];\n\n$vwoClient = new VWO($sdkConfig);\n\n// to get the variation name along with add a visitor hit to vwo app stats\n$variation = $vwoClient-\u003eactivate($campaignKey, $userId, $options);\n// Or, to get the variation name\n$variation = $vwoClient-\u003egetVariationName($campaignKey, $userId, $options);\n\n// add code here to use variation\n//...\n\n/**\n*send the track api hit to the vwo app stats to increase conversions\n* $revenue is optional send in case if there is any revenue inside $options\n*/\n\n$vwoClient-\u003etrack($campaignKey, $userId, $goalIdentifier, $options);\n```\n\n**Code for implementing User Storage Service**\n\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\nuse vwo\\Utils\\UserStorageInterface;\nClass UserStorage implements UserStorageInterface{\n  /**\n    * @param $userId\n    * @param $campaignKey\n    *\n    * @return array\n    */\n  public function get($userId, $campaignKey) {\n    // search in DB/Storage system\n    $variation = $db-\u003efetch($userId, $campaignKey); // replace with your implementation\n\n    return[\n      'userId' =\u003e $userId,\n      'campaignKey' =\u003e $campaignKey,\n      'variationName' =\u003e $variation\n    ];\n  }\n\n  /**\n    * @param $campaignUserMapping\n    * @return bool - could be changed\n    */\n  public function set($campaignUserMapping) {\n    // S...code to store in DB/storage system\n    return True;\n  }\n}\n```\n\n**Code for implementing Custom Logger**\n\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\nuse vwo\\Logger\\LoggerInterface;\n\n/**\n * Class CustomLogger\n */\nClass CustomLogger implements LoggerInterface{\n  /**\n    * @param $message\n    * @param $level\n    *\n    * @return\n    */\n  public function log($message, $level){\n    // use $level and log $message to either print or store them for later use\n  }\n\n}\n```\n\n## Documentation\n\nRefer [Official VWO Documentation](https://developers.vwo.com/reference#fullstack-introduction)\n\n## Third-party Resources and Credits\n\nRefer [third-party-attributions.txt](https://github.com/wingify/vwo-php-sdk/blob/master/third-party-attributions.txt)\n\n## Changelog\n\nRefer [CHANGELOG.md](https://github.com/wingify/vwo-php-sdk/blob/master/CHANGELOG.md)\n\n## Development and Test Cases\n\n1. Set development environment\n\n```bash\ncomposer run-script start\n```\n\n2. Run test cases\n\n```bash\ncomposer run-script test\n```\n\n3. Run linter\n\n```bash\ncomposer run-script test\n```\n\n4. Run code beautifier\n\n```bash\ncomposer run-script phpcbf\n```\n\n## License\n\n[Apache License, Version 2.0](https://github.com/wingify/vwo-php-sdk/blob/master/LICENSE)\n\nCopyright 2019-2022 Wingify Software Pvt. Ltd.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fvwo-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingify%2Fvwo-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fvwo-php-sdk/lists"}