Repository navigation
Conversation
The vendored fallback still required a PostHogService wrapper, which the Laravel SDK replaces. Sync the laravel rules with context-mill and stop the php rule from asking for PostHog::init() when posthog-laravel is used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
PostHog/context-mill#497 moves Laravel 12+ installs to
posthog/posthog-laravel. The evaluator's vendoredcommandments.yamlstill says to create aPostHogServicewrapper and register config by hand, and itsphprule says to callPostHog::init(). When the GitHub fetch fails and the evaluator falls back to this copy, it would mark a correct Laravel SDK install as wrong.Both Laravel apps here (
basic-integration/laravel/laravel12-saasanderror-tracking/cicd-github-actions-docker-php-laravel) are on Laravel 12, so both get the new setup.Changes
laravelrules: copied from context-mill, including fix(laravel): name the project token POSTHOG_PROJECT_TOKEN context-mill#501, which names the tokenPOSTHOG_PROJECT_TOKEN.phprule: initialize withPostHog::init()unless the app usesposthog/posthog-laravel.parseCommandmentsdoesn't unescape\\in quoted strings.The runtime fetch from context-mill
mainalready picks up the new rules once the context-mill stack merges. This keeps the fallback in step.How it was checked
Parsed the file with the evaluator's parsing rules: 6 Laravel rules and 5 PHP rules, with single backslashes in the facade name. Evaluator tests weren't run.
🤖 Generated with Claude Code