{"id":17753168,"url":"https://github.com/configcat/php-sdk","last_synced_at":"2025-10-27T00:26:08.919Z","repository":{"id":33874271,"uuid":"163211183","full_name":"configcat/php-sdk","owner":"configcat","description":"ConfigCat SDK for PHP. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2025-02-24T09:58:21.000Z","size":771,"stargazers_count":21,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T21:15:09.665Z","etag":null,"topics":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","php","remote-config"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-12-26T19:28:03.000Z","updated_at":"2025-04-07T19:58:59.000Z","dependencies_parsed_at":"2024-02-22T13:26:44.127Z","dependency_job_id":"d0f14ba4-cb73-4bbd-a098-f728dd2d6f99","html_url":"https://github.com/configcat/php-sdk","commit_stats":{"total_commits":163,"total_committers":14,"mean_commits":"11.642857142857142","dds":"0.42944785276073616","last_synced_commit":"146a236e1b217b00712f10bb29d1713376e6db10"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fphp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fphp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fphp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fphp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/php-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249153949,"owners_count":21221330,"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":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","php","remote-config"],"created_at":"2024-10-26T13:23:04.368Z","updated_at":"2025-10-27T00:26:03.847Z","avatar_url":"https://github.com/configcat.png","language":"PHP","readme":"# ConfigCat SDK for PHP\nhttps://configcat.com\n\nConfigCat SDK for PHP provides easy integration for your application to ConfigCat.\n\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n[![Build Status](https://github.com/configcat/php-sdk/actions/workflows/php-ci.yml/badge.svg?branch=master)](https://github.com/configcat/php-sdk/actions/workflows/php-ci.yml)\n[![Latest Stable Version](https://poser.pugx.org/configcat/configcat-client/version)](https://packagist.org/packages/configcat/configcat-client)\n[![Total Downloads](https://poser.pugx.org/configcat/configcat-client/downloads)](https://packagist.org/packages/configcat/configcat-client)\n[![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/configcat_php-sdk?logo=sonarcloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_php-sdk)\n[![Sonar Coverage](https://img.shields.io/sonar/coverage/configcat_php-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_php-sdk)\n\n## Requirements\n- PHP \u003e= 8.1\n\nConfigCat SDK for PHP \u003e= 7.1 is available [here](https://github.com/configcat/php7-sdk).\n\n## Getting started\n\n### 1. Install the package with [Composer](https://getcomposer.org/)\n```shell\ncomposer require configcat/configcat-client\n```\n\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/php-sdk/master/media/readme02-3.png  \"SDK-KEY\")\n\n### 3. Create the *ConfigCat* client instance\n```php\n$client = new \\ConfigCat\\ConfigCatClient(\"#YOUR-SDK-KEY#\");\n```\n\n### 4. Get your setting value:\n```php\n$isMyAwesomeFeatureEnabled = $client-\u003egetValue(\"isMyAwesomeFeatureEnabled\", false);\nif(is_bool($isMyAwesomeFeatureEnabled) \u0026\u0026 $isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else {\n    doTheOldThing();\n}\n```\n\n## Getting user specific setting values with Targeting\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `getValue()` function.\n\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\n\n\n## User object\nPercentage and targeted rollouts are calculated by the user object you can optionally pass to the configuration requests.\nThe user object must be created with a **mandatory** identifier parameter which should uniquely identify each user:\n```php\n$user = new \\ConfigCat\\User(\"#USER-IDENTIFIER#\"); // mandatory\n\n$isMyAwesomeFeatureEnabled = $client-\u003egetValue(\"isMyAwesomeFeatureEnabled\", false, $user);\nif(is_bool($isMyAwesomeFeatureEnabled) \u0026\u0026 $isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else {\n    doTheOldThing();\n}\n```\n\n## Sample/Demo app\n* [Sample Laravel app](https://github.com/ConfigCat/php-sdk/tree/master/samples/laravel)\n\n## Need help?\nhttps://configcat.com/support\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fphp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fphp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fphp-sdk/lists"}