Repository navigation
Conversation
The Laravel example and rules used POSTHOG_API_KEY, the PHP SDK's older name for the project token. PostHog calls it the project token everywhere else, and the wizard writes POSTHOG_PROJECT_TOKEN for Laravel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lient Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
Open
gewenyu99
marked this pull request as ready for review
November 10, 2026 22:01
edwinyjlim
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Laravel example and the Laravel rules tell agents to set the project token as
POSTHOG_API_KEY. That's the nameposthog-laravelreads today, but PostHog calls it the project token everywhere else, and the wizard writesPOSTHOG_PROJECT_TOKENfor Laravel. A wizard run following these rules puts the token in a variable the SDK doesn't read.Changes
POSTHOG_PROJECT_TOKEN.POSTHOG_API_KEYstays readable for apps that already set it, and agents don't write it for new installs.phpcommandment said to initialize withPostHog::init(). Laravel skills also carry thephptag, so it contradicted the Laravel rule not to. It now skipsinit()when the app usesposthog/posthog-laravel..env.example, the README andconfig/posthog.phpusePOSTHOG_PROJECT_TOKEN. The config matches the one feat: read the project token from POSTHOG_PROJECT_TOKEN posthog-php#311 publishes, withapi_keykept as the deprecated fallback.Blocked on
PostHog/posthog-php#311, which makes
posthog-laravelreadPOSTHOG_PROJECT_TOKEN. Before merging, bumpposthog/posthog-laravelinexample-apps/laravel/composer.jsonto the release that ships it.How it was checked
npm test(320 passed). The example hasn't been booted against the new SDK because it isn't released yet.Stacked on #497.
🤖 Generated with Claude Code