Skip to content

chore!: rename getFeatureFlagResult sendEvent to sendFeatureFlagEvent - #647

Merged
turnipdabeets merged 1 commit into
chore/v6-posthog-ios-4from
chore/v6-send-feature-flag-event-param
Oct 7, 2026
Merged

turnipdabeets merged 1 commit into
chore/v6-posthog-ios-4from
chore/v6-send-feature-flag-event-param

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Stacked on #637 (v6).

v6 renames the config option sendFeatureFlagEvents to sendFeatureFlagEvent (#636 / #638), but the per-call parameter on getFeatureFlagResult is still sendEvent, so one concept has two names. This renames it so everything matches:

  • PostHogConfig.sendFeatureFlagEvent (Flutter)
  • iOS getFeatureFlagResult(_ key:, sendFeatureFlagEvent:)
  • Android getFeatureFlagResult(key, sendFeatureFlagEvent: Boolean?)
  • the canonical option name in sdk-specs

v6 users already have to touch this setting for the config rename, so this is a hard rename in the major with no deprecation shim.

Migration:

// before
await Posthog().getFeatureFlagResult('my-flag', sendEvent: false);
// after
await Posthog().getFeatureFlagResult('my-flag', sendFeatureFlagEvent: false);

The parameter is also renamed on PosthogFlutterPlatformInterface.getFeatureFlagResult and its IO/web implementations (v6 is breaking for platform implementers anyway, same as #645).

Wire key: the method-channel argument key stays 'sendEvent'. Renaming it would touch the Kotlin and Swift plugins and the web handler for no user-facing benefit, the same choice as #645.

The getFeatureFlagPayload removal note in the #637 changeset now points to sendFeatureFlagEvent: false, so the v6 changelog doesn't recommend a name it also removes.

💚 How did you test it?

  • flutter analyze: no issues
  • flutter test: all 781 tests pass (existing getFeatureFlagResult tests updated to the new name; the IO tests still assert the 'sendEvent' wire key)
  • dart format --set-exit-if-changed: clean
  • scripts/check-api-dart.sh --update: api/posthog_flutter.api.json regenerated (3 param renames)

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code. Dart-only rename. Native plugins and the web handler are unchanged because the wire key is kept.

🤖 Generated with Claude Code

Matches PostHogConfig.sendFeatureFlagEvent and the iOS/Android
getFeatureFlagResult parameter. The method-channel key stays 'sendEvent'.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets self-assigned this Oct 7, 2026
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 7, 2026 15:54
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 7, 2026 15:54
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-10-07 15:57:55 UTC
Duration: 96554ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 130ms
Format Validation.Event Has Uuid ✅ 113ms
Format Validation.Event Has Lib Properties ✅ 112ms
Format Validation.Distinct Id Is String ✅ 111ms
Format Validation.Token Is Present ✅ 113ms
Format Validation.Custom Properties Preserved ✅ 112ms
Format Validation.Event Has Timestamp ✅ 113ms
Retry Behavior.Retries On 503 ✅ 5326ms
Retry Behavior.Does Not Retry On 400 ✅ 2113ms
Retry Behavior.Does Not Retry On 401 ✅ 2115ms
Retry Behavior.Respects Retry After Header ✅ 8120ms
Retry Behavior.Implements Backoff ✅ 15439ms
Retry Behavior.Retries On 500 ✅ 5221ms
Retry Behavior.Retries On 502 ✅ 5221ms
Retry Behavior.Retries On 504 ✅ 5221ms
Retry Behavior.Max Retries Respected ✅ 15437ms
Deduplication.Generates Unique Uuids ✅ 118ms
Deduplication.Preserves Uuid On Retry ✅ 5220ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10330ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5225ms
Deduplication.No Duplicate Events In Batch ✅ 117ms
Deduplication.Different Events Have Different Uuids ✅ 113ms
Compression.Sends Gzip When Enabled ✅ 112ms
Batch Format.Uses Proper Batch Structure ✅ 111ms
Batch Format.Flush With No Events Sends Nothing ✅ 107ms
Batch Format.Multiple Events Batched Together ✅ 118ms
Error Handling.Does Not Retry On 403 ✅ 2113ms
Error Handling.Does Not Retry On 413 ✅ 2114ms
Error Handling.Retries On 408 ✅ 5221ms

Feature_Flags Tests

✅ 16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 9ms
Request Payload.Flags Request Uses V2 Query Param ✅ 7ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 6ms
Request Payload.Flags Request Omits Authorization Header ✅ 7ms
Request Payload.Token In Flags Body Matches Init ✅ 7ms
Request Payload.Groups Round Trip ✅ 6ms
Request Payload.Groups Default To Empty Object ✅ 7ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 7ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 8ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 7ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 7ms
Request Lifecycle.No Flags Request On Init Alone ✅ 2ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 109ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 11ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 7ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 110ms

@turnipdabeets
turnipdabeets merged commit 90e2293 into chore/v6-posthog-ios-4 Oct 7, 2026
19 of 23 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v6-send-feature-flag-event-param branch October 7, 2026 17:57
turnipdabeets added a commit that referenced this pull request Oct 7, 2026
…#647)

Matches PostHogConfig.sendFeatureFlagEvent and the iOS/Android
getFeatureFlagResult parameter. The method-channel key stays 'sendEvent'.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets mentioned this pull request Oct 7, 2026
5 tasks done
turnipdabeets added a commit that referenced this pull request Oct 8, 2026
…#647)

Matches PostHogConfig.sendFeatureFlagEvent and the iOS/Android
getFeatureFlagResult parameter. The method-channel key stays 'sendEvent'.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants