{"id":20313702,"url":"https://github.com/posthog/posthog-php","last_synced_at":"2026-01-12T09:37:31.381Z","repository":{"id":39990684,"uuid":"242238690","full_name":"PostHog/posthog-php","owner":"PostHog","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T20:49:27.000Z","size":265,"stargazers_count":19,"open_issues_count":13,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T06:00:57.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PostHog.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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":"2020-02-21T22:04:30.000Z","updated_at":"2025-03-26T20:49:31.000Z","dependencies_parsed_at":"2025-03-22T05:00:23.777Z","dependency_job_id":null,"html_url":"https://github.com/PostHog/posthog-php","commit_stats":{"total_commits":136,"total_committers":17,"mean_commits":8.0,"dds":0.6838235294117647,"last_synced_commit":"f95f9146f388c735d65255f6550efc94f73d049f"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostHog","download_url":"https://codeload.github.com/PostHog/posthog-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299828,"owners_count":20916190,"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":[],"created_at":"2024-11-14T18:12:27.151Z","updated_at":"2026-01-12T09:37:31.376Z","avatar_url":"https://github.com/PostHog.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostHog PHP\n\n[![PHP Version](https://img.shields.io/packagist/php-v/posthog/posthog-php?logo=php)](https://packagist.org/packages/posthog/posthog-php)\n[![CI](https://github.com/PostHog/posthog-php/actions/workflows/php.yml/badge.svg)](https://github.com/PostHog/posthog-php/actions/workflows/php.yml)\n\nPlease see the main [PostHog docs](https://posthog.com/docs).\n\nSpecifically, the [PHP integration](https://posthog.com/docs/integrations/php-integration) details.\n\n## Features\n\n- ✅ Event capture and user identification\n- ✅ Feature flag local evaluation\n- ✅ **Feature flag dependencies** (new!) - Create conditional flags based on other flags\n- ✅ Multivariate flags and payloads\n- ✅ Group analytics\n- ✅ Comprehensive test coverage\n\n## Quick Start\n\n1. Copy `.env.example` to `.env` and add your PostHog credentials\n2. Run `php example.php` to see interactive examples of all features\n\n## Questions?\n\n### [Join our Slack community.](https://join.slack.com/t/posthogusers/shared_invite/enQtOTY0MzU5NjAwMDY3LTc2MWQ0OTZlNjhkODk3ZDI3NDVjMDE1YjgxY2I4ZjI4MzJhZmVmNjJkN2NmMGJmMzc2N2U3Yjc3ZjI5NGFlZDQ)\n\n## Contributing\n\n1. [Download PHP](https://www.php.net/manual/en/install.php) and [Composer](https://getcomposer.org/download/)\n2. `php composer.phar update` to install dependencies\n3. `bin/test` to run tests (this script calls `./vendor/bin/phpunit --verbose test`)\n\n## Releasing\n\nReleases are semi-automated via GitHub Actions. When a PR with the `release` and a version bump label is merged to `master`, the release workflow is triggered.\n\nYou'll need an approval from a PostHog engineer. If you're an employee, you can see the request in the [#approvals-client-libraries](https://app.slack.com/client/TSS5W8YQZ/C0A3UEVDDNF) channel.\n\n### Release Process\n\n1. **Create your PR** with the changes you want to release\n2. **Add the `release` label** to the PR\n3. **Add a version bump label** that should be either `bump-patch`, `bump-minor` or `bump-major`\n4. **Merge the PR** to `master`\n\nOnce merged, the following happens automatically:\n\n1. A Slack notification is sent to the client libraries channel requesting approval\n2. A maintainer approves the release in the GitHub `Release` environment\n3. The version is bumped in `lib/PostHog.php` and `composer.json` based on the version label (`patch`, `minor`, or `major`, extracted from the label)\n4. The `CHANGELOG.md` is updated with a link to the full changelog\n5. Changes are committed and pushed to `master`\n6. A git tag is created (e.g., `v1.8.0`)\n7. A GitHub release is created with the changelog content\n8. Slack is notified of the successful release\n\nReleases are installed directly from GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fposthog-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthog%2Fposthog-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fposthog-php/lists"}