vybekiit 0.7.26 → 0.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/bin.js +3910 -1300
  2. package/dist/global-guidance/language.md +443 -0
  3. package/dist/global-skills/add-ai/SKILL.md +1 -1
  4. package/dist/global-skills/add-analytics/SKILL.md +1 -1
  5. package/dist/global-skills/add-blog/SKILL.md +1 -1
  6. package/dist/global-skills/add-crud/SKILL.md +1 -1
  7. package/dist/global-skills/add-files/SKILL.md +1 -1
  8. package/dist/global-skills/add-images/SKILL.md +1 -1
  9. package/dist/global-skills/add-language/SKILL.md +1 -1
  10. package/dist/global-skills/add-notifications/SKILL.md +1 -1
  11. package/dist/global-skills/add-realtime/SKILL.md +1 -1
  12. package/dist/global-skills/add-route/SKILL.md +1 -1
  13. package/dist/global-skills/add-search/SKILL.md +1 -1
  14. package/dist/global-skills/add-signin/SKILL.md +1 -1
  15. package/dist/global-skills/add-teams/SKILL.md +1 -1
  16. package/dist/global-skills/add-upload/SKILL.md +1 -1
  17. package/dist/global-skills/aws-cdk/SKILL.md +19 -5
  18. package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
  19. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
  20. package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
  21. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
  22. package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
  23. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
  24. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
  25. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
  26. package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
  27. package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
  28. package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
  29. package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
  30. package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
  31. package/dist/global-skills/aws-serverless/SKILL.md +9 -1
  32. package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
  33. package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
  34. package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
  35. package/dist/global-skills/back-up-my-code/SKILL.md +1 -1
  36. package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
  37. package/dist/global-skills/buy-domain/SKILL.md +1 -1
  38. package/dist/global-skills/check-safety/SKILL.md +1 -1
  39. package/dist/global-skills/configure-capabilities/SKILL.md +1 -1
  40. package/dist/global-skills/connect-account/SKILL.md +1 -1
  41. package/dist/global-skills/connect-account-backend/SKILL.md +1 -1
  42. package/dist/global-skills/design-my-data/SKILL.md +1 -1
  43. package/dist/global-skills/doctor/SKILL.md +1 -1
  44. package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
  45. package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
  46. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
  47. package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
  48. package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
  49. package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
  50. package/dist/global-skills/eas-simulator/SKILL.md +48 -26
  51. package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
  52. package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
  53. package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
  54. package/dist/global-skills/eas-update/SKILL.md +146 -0
  55. package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
  56. package/dist/global-skills/expo-animation/RECIPES.md +2 -2
  57. package/dist/global-skills/expo-animation/SKILL.md +9 -2
  58. package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
  59. package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
  60. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
  61. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
  62. package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
  63. package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
  64. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
  65. package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
  66. package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
  67. package/dist/global-skills/expo-design-system/SKILL.md +27 -7
  68. package/dist/global-skills/expo-design-system/references/audit.md +7 -2
  69. package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
  70. package/dist/global-skills/expo-examples/SKILL.md +0 -1
  71. package/dist/global-skills/expo-examples/references/catalog.md +1 -1
  72. package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
  73. package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
  74. package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
  75. package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
  76. package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
  77. package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
  78. package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
  79. package/dist/global-skills/expo-native-ui/references/media.md +15 -20
  80. package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
  81. package/dist/global-skills/expo-overview/SKILL.md +17 -12
  82. package/dist/global-skills/expo-router/SKILL.md +5 -3
  83. package/dist/global-skills/expo-router/references/tabs.md +5 -5
  84. package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
  85. package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
  86. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
  87. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
  88. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
  89. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
  90. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
  91. package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
  92. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
  93. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
  94. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
  95. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
  96. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
  97. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
  98. package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
  99. package/dist/global-skills/firebase-data-connect/examples.md +4 -4
  100. package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
  101. package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
  102. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
  103. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
  104. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
  105. package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
  106. package/dist/global-skills/firebase-data-connect/templates.md +2 -1
  107. package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
  108. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
  109. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
  110. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
  111. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
  112. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
  113. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
  114. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
  115. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
  116. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
  117. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
  118. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
  119. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
  120. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
  121. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
  122. package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
  123. package/dist/global-skills/go-live/SKILL.md +1 -1
  124. package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
  125. package/dist/global-skills/harden/SKILL.md +1 -1
  126. package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
  127. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
  128. package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
  129. package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
  130. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
  131. package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
  132. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
  133. package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
  134. package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
  135. package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
  136. package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
  137. package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
  138. package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
  139. package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
  140. package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
  141. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
  142. package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
  143. package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
  144. package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
  145. package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
  146. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
  147. package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
  148. package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
  149. package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
  150. package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
  151. package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
  152. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
  153. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
  154. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
  155. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
  156. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
  157. package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
  158. package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
  159. package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
  160. package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
  161. package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
  162. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
  163. package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
  164. package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
  165. package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
  166. package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
  167. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
  168. package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
  169. package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
  170. package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
  171. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
  172. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
  173. package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
  174. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
  175. package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
  176. package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
  177. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
  178. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
  179. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
  180. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
  181. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
  182. package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
  183. package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
  184. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
  185. package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
  186. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
  187. package/dist/global-skills/manifest.json +8 -2
  188. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
  189. package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
  190. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
  191. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
  192. package/dist/global-skills/neon/SKILL.md +207 -213
  193. package/dist/global-skills/neon/references/auth.md +12 -0
  194. package/dist/global-skills/neon/references/claimable-neon.md +10 -14
  195. package/dist/global-skills/neon/references/function-triggers.md +53 -0
  196. package/dist/global-skills/neon/references/logs-loki.md +61 -0
  197. package/dist/global-skills/neon/references/parse-env.md +32 -0
  198. package/dist/global-skills/neon/references/sdk.md +7 -0
  199. package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
  200. package/dist/global-skills/neon-auth/SKILL.md +155 -0
  201. package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
  202. package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
  203. package/dist/global-skills/neon-functions/SKILL.md +159 -84
  204. package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
  205. package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
  206. package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
  207. package/dist/global-skills/neon-functions/references/mcp.md +1 -1
  208. package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
  209. package/dist/global-skills/neon-functions/references/sse.md +8 -5
  210. package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
  211. package/dist/global-skills/neon-postgres/SKILL.md +120 -17
  212. package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
  213. package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
  214. package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
  215. package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
  216. package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
  217. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
  218. package/dist/global-skills/onboarding/SKILL.md +16 -14
  219. package/dist/global-skills/plan-my-idea/SKILL.md +1 -1
  220. package/dist/global-skills/publish-app/SKILL.md +1 -1
  221. package/dist/global-skills/publish-extension/SKILL.md +1 -1
  222. package/dist/global-skills/resend/SKILL.md +4 -2
  223. package/dist/global-skills/resend/references/broadcasts.md +6 -1
  224. package/dist/global-skills/resend/references/receiving.md +29 -10
  225. package/dist/global-skills/resend/references/sending/email-management.md +14 -4
  226. package/dist/global-skills/resend/references/topics.md +9 -6
  227. package/dist/global-skills/resend/references/usage.md +117 -0
  228. package/dist/global-skills/resend/references/webhooks.md +59 -2
  229. package/dist/global-skills/reset-password/SKILL.md +1 -1
  230. package/dist/global-skills/save-data/SKILL.md +1 -1
  231. package/dist/global-skills/setup-email/SKILL.md +1 -1
  232. package/dist/global-skills/setup-payments/SKILL.md +1 -1
  233. package/dist/global-skills/setup-sms/SKILL.md +1 -1
  234. package/dist/global-skills/sign-in-with-email-link/SKILL.md +1 -1
  235. package/dist/global-skills/sign-in-with-google/SKILL.md +1 -1
  236. package/dist/global-skills/sign-in-with-phone/SKILL.md +1 -1
  237. package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
  238. package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
  239. package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
  240. package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
  241. package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
  242. package/dist/global-skills/supabase/SKILL.md +6 -0
  243. package/dist/global-skills/track-errors/SKILL.md +1 -1
  244. package/dist/global-skills/update-kit/SKILL.md +1 -1
  245. package/dist/global-skills/use-railway/SKILL.md +42 -22
  246. package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
  247. package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
  248. package/dist/global-skills/use-railway/references/configure.md +17 -2
  249. package/dist/global-skills/use-railway/references/databases.md +107 -0
  250. package/dist/global-skills/use-railway/references/deploy.md +5 -5
  251. package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
  252. package/dist/global-skills/use-railway/references/iac.md +66 -77
  253. package/dist/global-skills/use-railway/references/operate.md +26 -3
  254. package/dist/global-skills/use-railway/references/request.md +31 -23
  255. package/dist/global-skills/use-railway/references/setup.md +16 -5
  256. package/dist/global-skills/use-railway/references/tracing.md +261 -0
  257. package/dist/global-skills/use-railway/references/usage.md +52 -0
  258. package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
  259. package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +17 -13
  260. package/dist/global-skills/watch-my-app/SKILL.md +53 -0
  261. package/dist/global-skills/wire-auth/SKILL.md +1 -1
  262. package/dist/global-skills/wire-database/SKILL.md +1 -1
  263. package/dist/global-skills/wire-email/SKILL.md +1 -1
  264. package/dist/global-skills/wire-payments/SKILL.md +1 -1
  265. package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
  266. package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
  267. package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
  268. package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
  269. package/dist/global-skills/wrangler/SKILL.md +48 -901
  270. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
  271. package/package.json +9 -8
  272. package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
  273. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
  274. package/dist/global-skills/workers-best-practices/references/review.md +0 -174
@@ -1,10 +1,6 @@
1
1
  > AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
2
2
 
3
- # PHP - Docs
4
-
5
- Copy page
6
-
7
- # PHP - Docs
3
+ # PHP
8
4
 
9
5
  This is an optional library you can install if you're working with PHP. It uses an internal queue to batch requests, flushes at the end of the request, and optionally does so in an async manner.
10
6
 
@@ -14,8 +10,6 @@ Install the package with Composer:
14
10
 
15
11
  Terminal
16
12
 
17
- PostHog AI
18
-
19
13
  ```bash
20
14
  composer require posthog/posthog-php
21
15
  ```
@@ -24,8 +18,6 @@ In your app, set your project token before making any calls.
24
18
 
25
19
  PHP
26
20
 
27
- PostHog AI
28
-
29
21
  ```php
30
22
  PostHog\PostHog::init("<ph_project_token>",
31
23
  ['host' => 'https://us.i.posthog.com']
@@ -48,8 +40,6 @@ You can send custom events using `capture`:
48
40
 
49
41
  PHP
50
42
 
51
- PostHog AI
52
-
53
43
  ```php
54
44
  PostHog::capture([
55
45
  'distinctId' => 'distinct_id_of_the_user',
@@ -65,8 +55,6 @@ Optionally, you can include additional information with the event by including a
65
55
 
66
56
  PHP
67
57
 
68
- PostHog AI
69
-
70
58
  ```php
71
59
  PostHog::capture([
72
60
  'distinctId' => 'distinct_id_of_the_user',
@@ -84,8 +72,6 @@ If you're aiming for a backend-only implementation of PostHog and won't be captu
84
72
 
85
73
  PHP
86
74
 
87
- PostHog AI
88
-
89
75
  ```php
90
76
  PostHog::capture([
91
77
  'distinctId' => 'distinct_id_of_the_user',
@@ -98,12 +84,10 @@ PostHog::capture([
98
84
 
99
85
  ## Person profiles and properties
100
86
 
101
- The PHP SDK captures identified events by default. These create [person profiles](/docs/data/persons.md). To set [person properties](/docs/data/user-properties.md), call `identify` with the user's distinct ID and properties:
87
+ The PHP SDK captures identified events by default. These create [person profiles](/docs/data/persons.md). To set [person properties](/docs/product-analytics/person-properties.md), call `identify` with the user's distinct ID and properties:
102
88
 
103
89
  PHP
104
90
 
105
- PostHog AI
106
-
107
91
  ```php
108
92
  PostHog::identify([
109
93
  'distinctId' => 'distinct_id',
@@ -118,8 +102,6 @@ You can also include person properties when capturing an event:
118
102
 
119
103
  PHP
120
104
 
121
- PostHog AI
122
-
123
105
  ```php
124
106
  PostHog::capture([
125
107
  'distinctId' => 'distinct_id',
@@ -135,14 +117,12 @@ PostHog::capture([
135
117
  ]);
136
118
  ```
137
119
 
138
- For more details on the difference between `$set` and `$set_once`, see our [person properties docs](/docs/data/user-properties.md#what-is-the-difference-between-set-and-set_once).
120
+ For more details on the difference between `$set` and `$set_once`, see our [person properties docs](/docs/product-analytics/person-properties.md#what-is-the-difference-between-set-and-set_once).
139
121
 
140
122
  To capture [anonymous events](/docs/data/anonymous-vs-identified-events.md) without person profiles, set the event's `$process_person_profile` property to `false`:
141
123
 
142
124
  PHP
143
125
 
144
- PostHog AI
145
-
146
126
  ```php
147
127
  PostHog::capture([
148
128
  'distinctId' => 'distinct_id',
@@ -161,8 +141,6 @@ In this case, you can use `alias` to assign another distinct ID to the same user
161
141
 
162
142
  PHP
163
143
 
164
- PostHog AI
165
-
166
144
  ```php
167
145
  PostHog::alias([
168
146
  'distinctId' => 'distinct_id',
@@ -170,7 +148,7 @@ PostHog::alias([
170
148
  ]);
171
149
  ```
172
150
 
173
- We strongly recommend reading our docs on [alias](/docs/data/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
151
+ We strongly recommend reading our docs on [alias](/docs/product-analytics/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
174
152
 
175
153
  ## Feature flags
176
154
 
@@ -186,10 +164,9 @@ Call `PostHog::evaluateFlags()` once for the user, then read values from the ret
186
164
 
187
165
  PHP
188
166
 
189
- PostHog AI
190
-
191
167
  ```php
192
168
  $flags = PostHog::evaluateFlags('distinct_id_of_your_user');
169
+
193
170
  if ($flags->isEnabled('flag-key')) {
194
171
  // Do something differently for this user
195
172
  // Optional: fetch the payload
@@ -201,11 +178,11 @@ if ($flags->isEnabled('flag-key')) {
201
178
 
202
179
  PHP
203
180
 
204
- PostHog AI
205
-
206
181
  ```php
207
182
  $flags = PostHog::evaluateFlags('distinct_id_of_your_user');
183
+
208
184
  $enabledVariant = $flags->getFlag('flag-key');
185
+
209
186
  if ($enabledVariant === 'variant-key') { // replace 'variant-key' with the key of your variant
210
187
  // Do something differently for this user
211
188
  // Optional: fetch the payload
@@ -233,13 +210,13 @@ Pass the same `flags` object that you used for branching. This attaches the exac
233
210
 
234
211
  PHP
235
212
 
236
- PostHog AI
237
-
238
213
  ```php
239
214
  $flags = PostHog::evaluateFlags('distinct_id_of_your_user');
215
+
240
216
  if ($flags->isEnabled('flag-key')) {
241
217
  // Do something differently for this user
242
218
  }
219
+
243
220
  PostHog::capture([
244
221
  'distinctId' => 'distinct_id_of_your_user',
245
222
  'event' => 'event_name',
@@ -253,8 +230,6 @@ To reduce event property bloat, pass a filtered snapshot:
253
230
 
254
231
  PHP
255
232
 
256
- PostHog AI
257
-
258
233
  ```php
259
234
  // Attach only flags accessed with isEnabled() or getFlag() before this call
260
235
  PostHog::capture([
@@ -262,6 +237,7 @@ PostHog::capture([
262
237
  'event' => 'event_name',
263
238
  'flags' => $flags->onlyAccessed(),
264
239
  ]);
240
+
265
241
  // Attach only specific flags
266
242
  PostHog::capture([
267
243
  'distinctId' => 'distinct_id_of_your_user',
@@ -278,8 +254,6 @@ In the event properties, include `$feature/feature_flag_name: variant_key`:
278
254
 
279
255
  PHP
280
256
 
281
- PostHog AI
282
-
283
257
  ```php
284
258
  PostHog::capture([
285
259
  'distinctId' => 'distinct_id_of_your_user',
@@ -297,8 +271,6 @@ By default, `evaluateFlags()` evaluates every flag for the user. If you only nee
297
271
 
298
272
  PHP
299
273
 
300
- PostHog AI
301
-
302
274
  ```php
303
275
  $flags = PostHog::evaluateFlags(
304
276
  distinctId: 'distinct_id_of_your_user',
@@ -312,8 +284,6 @@ $flags = PostHog::evaluateFlags(
312
284
 
313
285
  PHP
314
286
 
315
- PostHog AI
316
-
317
287
  ```php
318
288
  $flags = PostHog::evaluateFlags(
319
289
  distinctId: 'distinct_id_of_your_user',
@@ -344,8 +314,6 @@ For example:
344
314
 
345
315
  PHP
346
316
 
347
- PostHog AI
348
-
349
317
  ```php
350
318
  $flags = PostHog::evaluateFlags(
351
319
  distinctId: 'distinct_id_of_the_user',
@@ -359,6 +327,7 @@ $flags = PostHog::evaluateFlags(
359
327
  'another_group_type' => ['group_property_name' => 'value'],
360
328
  ],
361
329
  );
330
+
362
331
  if ($flags->isEnabled('flag-key')) {
363
332
  // Do something differently for this user
364
333
  }
@@ -397,8 +366,6 @@ You can configure the `feature_flag_request_timeout_ms` parameter when initializ
397
366
 
398
367
  PHP
399
368
 
400
- PostHog AI
401
-
402
369
  ```php
403
370
  PostHog::init("<ph_project_token>",
404
371
  [
@@ -418,8 +385,6 @@ To load feature flag definitions for local evaluation, initialize the SDK with y
418
385
 
419
386
  PHP
420
387
 
421
- PostHog AI
422
-
423
388
  ```php
424
389
  PostHog::init(
425
390
  '<ph_project_token>',
@@ -436,11 +401,10 @@ Since [experiments](/docs/experiments/start-here.md) use feature flags, the code
436
401
 
437
402
  PHP
438
403
 
439
- PostHog AI
440
-
441
404
  ```php
442
405
  $flags = PostHog::evaluateFlags('user_distinct_id');
443
406
  $variant = $flags->getFlag('experiment-feature-flag-key');
407
+
444
408
  if ($variant === 'variant-name') {
445
409
  // Do something differently for this user
446
410
  }
@@ -458,8 +422,6 @@ To create a group or update its properties, use `groupIdentify`:
458
422
 
459
423
  PHP
460
424
 
461
- PostHog AI
462
-
463
425
  ```php
464
426
  PostHog::groupIdentify([
465
427
  'groupType' => 'company',
@@ -482,8 +444,6 @@ Once a group is created, you can use the `capture` method and pass in the `group
482
444
 
483
445
  PHP
484
446
 
485
- PostHog AI
486
-
487
447
  ```php
488
448
  PostHog::capture([
489
449
  'distinctId' => 'user_distinct_id',
@@ -498,8 +458,6 @@ Use request context to apply a distinct ID, session ID, and common properties to
498
458
 
499
459
  PHP
500
460
 
501
- PostHog AI
502
-
503
461
  ```php
504
462
  PostHog::withContext([
505
463
  'distinctId' => 'user_distinct_id',
@@ -520,10 +478,9 @@ Then read the incoming headers on the server:
520
478
 
521
479
  PHP
522
480
 
523
- PostHog AI
524
-
525
481
  ```php
526
482
  $context = PostHog::contextFromHeaders($_SERVER);
483
+
527
484
  PostHog::withContext($context, function () {
528
485
  PostHog::capture([
529
486
  'event' => 'backend_event',
@@ -543,8 +500,6 @@ To automatically capture uncaught exceptions, PHP errors, and fatal shutdown err
543
500
 
544
501
  PHP
545
502
 
546
- PostHog AI
547
-
548
503
  ```php
549
504
  PostHog::init(
550
505
  '<ph_project_token>',
@@ -567,8 +522,6 @@ When calling `PostHog::init`, there are various configuration options you can se
567
522
 
568
523
  PHP
569
524
 
570
- PostHog AI
571
-
572
525
  ```php
573
526
  PostHog::init(
574
527
  '<ph_project_token>',
@@ -585,31 +538,31 @@ All possible options below:
585
538
 
586
539
  | Attribute | Description |
587
540
  | --- | --- |
588
- | hostType: StringDefault: us.i.posthog.com | URL of your PostHog instance. |
589
- | sslType: BooleanDefault: true | Whether to use SSL for API requests or not. If host includes http:// or https://, the SDK infers this option unless you set it explicitly. |
590
- | timeoutType: IntegerDefault: 10000 | Request timeout in milliseconds. |
591
- | verify_batch_events_requestType: BooleanDefault: true | Whether to verify successful delivery of batch events (true, synchronous) or fire and forget (false, asynchronous) with the lib_curl consumer. |
592
- | feature_flag_request_timeout_msType: IntegerDefault: 3000 | Request timeout for feature flags in milliseconds. |
593
- | flag_definition_cache_providerType: PostHog\\FlagDefinitionCacheProviderDefault: null | Provider for distributed local-evaluation flag definition caching. See [local evaluation in distributed environments](/docs/feature-flags/local-evaluation/distributed-environments?tab=PHP.md). |
594
- | maximum_backoff_durationType: IntegerDefault: 10000 | Request retry backoff. Retries stop after this duration is hit. |
595
- | consumerType: StringDefault: lib_curl | One of socket, file, lib_curl, fork_curl, and noop. Determines what transport option to use for analytics capture. |
596
- | debugType: BooleanDefault: false | Output debug logs or not. |
597
- | max_queue_sizeType: IntegerDefault: 1000 | Maximum number of events to queue before rejecting new events. Applies to queued consumers. |
598
- | batch_sizeType: IntegerDefault: 100 | Number of queued events to send in each batch. Applies to queued consumers. |
599
- | compress_requestType: Boolean/StringDefault: false | Whether to gzip batch request payloads. |
600
- | error_handlerType: CallableDefault: null | Callback invoked for SDK transport errors. |
601
- | filenameType: StringDefault: sys_get_temp_dir() . '/posthog.log' | File path used when consumer is set to file. |
602
- | error_trackingType: ArrayDefault: [] | Enables automatic error tracking. See the options below or the [PHP error tracking setup guide](/docs/error-tracking/installation/php.md). |
541
+ | `host` **Type:** String **Default:** `us.i.posthog.com` | URL of your PostHog instance. |
542
+ | `ssl` **Type:** Boolean **Default:** `true` | Whether to use SSL for API requests or not. If `host` includes `http://` or `https://`, the SDK infers this option unless you set it explicitly. |
543
+ | `timeout` **Type:** Integer **Default:** `10000` | Request timeout in milliseconds. |
544
+ | `verify_batch_events_request` **Type:** Boolean **Default:** `true` | Whether to verify successful delivery of batch events (true, synchronous) or fire and forget (false, asynchronous) with the `lib_curl` consumer. |
545
+ | `feature_flag_request_timeout_ms` **Type:** Integer **Default:** `3000` | Request timeout for feature flags in milliseconds. |
546
+ | `flag_definition_cache_provider` **Type:** `PostHog\FlagDefinitionCacheProvider` **Default:** `null` | Provider for distributed local-evaluation flag definition caching. See [local evaluation in distributed environments](/docs/feature-flags/local-evaluation/distributed-environments?tab=PHP.md). |
547
+ | `maximum_backoff_duration` **Type:** Integer **Default:** `10000` | Request retry backoff. Retries stop after this duration is hit. |
548
+ | `consumer` **Type:** String **Default:** `lib_curl` | One of `socket`, `file`, `lib_curl`, `fork_curl`, and `noop`. Determines what transport option to use for analytics capture. |
549
+ | `debug` **Type:** Boolean **Default:** `false` | Output debug logs or not. |
550
+ | `max_queue_size` **Type:** Integer **Default:** `1000` | Maximum number of events to queue before rejecting new events. Applies to queued consumers. |
551
+ | `batch_size` **Type:** Integer **Default:** `100` | Number of queued events to send in each batch. Applies to queued consumers. |
552
+ | `compress_request` **Type:** Boolean/String **Default:** `false` | Whether to gzip batch request payloads. |
553
+ | `error_handler` **Type:** Callable **Default:** `null` | Callback invoked for SDK transport errors. |
554
+ | `filename` **Type:** String **Default:** `sys_get_temp_dir() . '/posthog.log'` | File path used when `consumer` is set to `file`. |
555
+ | `error_tracking` **Type:** Array **Default:** `[]` | Enables automatic error tracking. See the options below or the [PHP error tracking setup guide](/docs/error-tracking/installation/php.md). |
603
556
 
604
557
  ### Error tracking options
605
558
 
606
559
  | Attribute | Description |
607
560
  | --- | --- |
608
- | enabledType: BooleanDefault: false | Enables automatic error tracking handlers. Manual captureException works regardless. |
609
- | capture_errorsType: BooleanDefault: true | When enabled, captures PHP errors and fatal shutdown errors in addition to uncaught exceptions. |
610
- | excluded_exceptionsType: Array of class stringsDefault: [] | Throwable classes to skip during automatic capture. |
611
- | max_framesType: IntegerDefault: 20 | Maximum number of stack frames included in $exception_list. |
612
- | context_providerType: Callable or nullDefault: null | Callback that returns distinctId and extra event properties for automatic captures. |
561
+ | `enabled` **Type:** Boolean **Default:** `false` | Enables automatic error tracking handlers. Manual `captureException` works regardless. |
562
+ | `capture_errors` **Type:** Boolean **Default:** `true` | When enabled, captures PHP errors and fatal shutdown errors in addition to uncaught exceptions. |
563
+ | `excluded_exceptions` **Type:** Array of class strings **Default:** `[]` | Throwable classes to skip during automatic capture. |
564
+ | `max_frames` **Type:** Integer **Default:** `20` | Maximum number of stack frames included in `$exception_list`. |
565
+ | `context_provider` **Type:** Callable or `null` **Default:** `null` | Callback that returns `distinctId` and extra event properties for automatic captures. |
613
566
 
614
567
  ## Flushing and shutting down
615
568
 
@@ -617,8 +570,6 @@ Call `PostHog::flush()` to send queued events without closing resources. When a
617
570
 
618
571
  PHP
619
572
 
620
- PostHog AI
621
-
622
573
  ```php
623
574
  PostHog::shutdown();
624
575
  ```
@@ -627,8 +578,6 @@ PostHog::shutdown();
627
578
 
628
579
  PHP
629
580
 
630
- PostHog AI
631
-
632
581
  ```php
633
582
  PostHog::init(
634
583
  '<ph_project_token>',