{"id":29946120,"url":"https://github.com/wingify/vwo-openfeature-provider-php","last_synced_at":"2025-08-03T05:13:08.745Z","repository":{"id":279593123,"uuid":"938718544","full_name":"wingify/vwo-openfeature-provider-php","owner":"wingify","description":"VWO Openfeature Provider for PHP","archived":false,"fork":false,"pushed_at":"2025-02-26T10:49:08.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-26T11:41:23.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":"2025-02-25T11:50:50.000Z","updated_at":"2025-02-26T10:50:13.000Z","dependencies_parsed_at":"2025-02-26T11:41:30.914Z","dependency_job_id":"de0702c0-0c63-4d63-96e8-77ca50d363d1","html_url":"https://github.com/wingify/vwo-openfeature-provider-php","commit_stats":null,"previous_names":["wingify/vwo-openfeature-provider-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wingify/vwo-openfeature-provider-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-openfeature-provider-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-openfeature-provider-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-openfeature-provider-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-openfeature-provider-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingify","download_url":"https://codeload.github.com/wingify/vwo-openfeature-provider-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fvwo-openfeature-provider-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268496076,"owners_count":24259411,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-03T05:12:55.030Z","updated_at":"2025-08-03T05:13:08.694Z","avatar_url":"https://github.com/wingify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## VWO OpenFeature Provider PHP\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/vwo/vwo-openfeature-provider-php.svg)](https://packagist.org/packages/vwo/vwo-openfeature-provider-php)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\n### Requirements\n\n\u003e PHP \u003e= 7.4\n\n### Installation\n\nInstall the latest version with\n\n```bash\ncomposer require vwo/vwo-openfeature-provider-php\n```\n\n## Basic Usage\n\n```php\nuse OpenFeature\\OpenFeatureAPI;\nuse OpenFeature\\implementation\\flags\\EvaluationContext;\nuse VWOOpenFeatureProvider\\VWOProvider;\nuse vwo\\VWO;\n\nclass OpenFeatureTest {\n  public static function main() {\n    // Initialize the VWO client options\n    $vwoInitOptions = [\n        'sdkKey' =\u003e 'your-sdk-key-here',     // Replace with your SDK Key\n        'accountId' =\u003e 123456,               // Replace with your VWO Account ID\n    ];\n\n    // Initialize VWO Client\n    $vwoClient = VWO::init($vwoInitOptions);\n    if ($vwoClient === null) {\n        echo \"Failed to initialize VWO Client\\n\";\n        return;\n    }\n\n    // Initialize the VWO provider\n    $vwoProvider = new VWOProvider($vwoClient);\n\n    // Set the provider using OpenFeature API\n    $api = OpenFeatureAPI::getInstance();\n    $api-\u003esetProvider($vwoProvider);\n\n    // Call the test flags method to evaluate different flag types\n    self::testFlags($api);\n  }\n\n  public static function testFlags(OpenFeatureAPI $api) {\n    // Create custom variables for the context\n    $customVariables = [\n        'name' =\u003e 'Ashley'\n    ];\n\n    // Manually creating EvaluationContext with targetingKey and additional attributes\n    $attributes = new OpenFeature\\implementation\\flags\\Attributes([\n        'key' =\u003e 'variable-key',\n        'customVariables' =\u003e $customVariables, // Custom variables\n    ]);\n\n    $context = new EvaluationContext('userId1', $attributes);\n\n    // Get the client from OpenFeature API\n    $client = $api-\u003egetClient();\n\n    // Test object flag\n    $objectResult = $client-\u003egetObjectValue('f1',$customVariables, $context);\n    echo \"OBJECT result: \" . json_encode($objectResult) . \"\\n\";\n  }\n}\n\n// Run the OpenFeatureTest script\nOpenFeatureTest::main();\n```\n\n## Changelog\n\nRefer [CHANGELOG.md](https://github.com/wingify/vwo-openfeature-provider-php/blob/master/CHANGELOG.md)\n\n## Setting up development environment\n\n```bash\ncomposer run-script start\n```\n\n### Contributing\n\nPlease go through our [contributing guidelines](https://github.com/wingify/vwo-openfeature-provider-php/blob/master/CONTRIBUTING.md)\n\n### Code of Conduct\n\n[Code of Conduct](https://github.com/wingify/vwo-openfeature-provider-php/blob/master/CODE_OF_CONDUCT.md)\n\n### License\n\n[Apache License, Version 2.0](https://github.com/wingify/vwo-openfeature-provider-php/blob/master/LICENSE)\n\nCopyright 2024-2025 Wingify Software Pvt. Ltd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fvwo-openfeature-provider-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingify%2Fvwo-openfeature-provider-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fvwo-openfeature-provider-php/lists"}