Skip to content

chore!: Flutter Major Release v6 - #637

Draft
turnipdabeets wants to merge 9 commits into
mainfrom
chore/v6-posthog-ios-4
Draft

turnipdabeets wants to merge 9 commits into
mainfrom
chore/v6-posthog-ios-4

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

This is the base PR for posthog_flutter 6.0.0. It raises the iOS and macOS minimums to match posthog-ios 4.0 and removes the APIs we had already marked for removal in the next major.

It still depends on posthog-ios 3.x (>= 3.84.0, < 4.0.0), so CI can pass before 4.0 is published. Adopting posthog-ios 4.0 (PostHog/posthog-ios#873), with its 4.x range, Xcode 26 requirement and iOS behavior changes, is in the stacked #649.

Merge order: merge #649 into this branch once posthog-ios 4.0 is published, then merge this PR into main. Merging this PR first would line up a 6.0.0 release that still uses posthog-ios 3.x, because publish.yml runs on every changeset push to main.

iOS and macOS minimums

  • iOS deployment target raised from 13.0 to 15.0, and macOS from 10.15 to 11.0 to match posthog-ios 4.0 (PostHog/posthog-ios#906). Over the last 30 days, posthog-ios saw 4 events from macOS 10.15 across PostHog Cloud. Also dropped the #available(iOS 14.0, macOS 11.0, *) check around the push-open prewarm, which the new minimums make always true
  • Example app's iOS target is now 15.0
  • codeql.yml moved from Xcode 16.4 to 26.4
  • Removed .cellular from the iOS dataMode mapping, and dropped the #available(iOS 15.0, *) check around surveys, which the new minimum makes always true

Removed deprecated APIs

  • PostHogConfig.apiKey, the apiKey setup alias, and the com.posthog.posthog.API_KEY manifest/Info.plist fallback (Android and iOS)
  • Posthog().getFeatureFlagPayload(): removed from Dart, the platform interface, web and both native handlers
  • The PostHogConfig.debouncerDelay setter
  • PostHogDataMode.cellular

Android minSdk

  • minSdkVersion goes from 21 to 23. The plugin depends on posthog-android [3.71.0, 4.0.0), and posthog-android has required minSdk 23 since 3.39.0 (chore: upgrade to Kotlin 2.1.10, AGP 8.9.1, compileSdk 36, minSdk 23 posthog-android#460). An app on minSdk 21 or 22 already fails Gradle's manifest merge on that dependency, so the old 21 was stale. This doesn't change who can build, so it isn't listed as breaking. It only makes the plugin declare the floor it already has. 23 also matches Datadog's and Firebase's Flutter plugins.

Merged into this branch

Deliberately excluded

💚 How did you test it?

  • flutter analyze, flutter test (781 pass), dart format --set-exit-if-changed, scripts/check-api-dart.sh
  • Android: ktlint, flutter build apk (re-run after the minSdk 23 change), ./gradlew :posthog_flutter:testDebugUnitTest
  • iOS and macOS: CI builds the plugin with CocoaPods and SPM against posthog-ios 3.x. The posthog-ios 4.0 build is verified in chore!: adopt posthog-ios 4.0 #649.

📝 Checklist

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Made with Claude Code.
  • Scope: anything that could ship in a minor was kept out of this major.
  • posthog-ios 4.0 adoption is in the stacked chore!: adopt posthog-ios 4.0 #649.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 3, 2026
@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Retrigger

[High risk] Upgrades PostHog iOS SDK and removes deprecated APIs.

The reviewed changes appear safe to merge, with one non-blocking release-note correction.

Reviews (1) · Last reviewed commit: "chore!: adopt posthog-ios 4.0 and remove..."

Comment thread .changeset/v6-posthog-ios-4.md Outdated
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-10-26 18:42:05 UTC
Duration: 96793ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 142ms
Format Validation.Event Has Uuid ✅ 118ms
Format Validation.Event Has Lib Properties ✅ 114ms
Format Validation.Distinct Id Is String ✅ 114ms
Format Validation.Token Is Present ✅ 114ms
Format Validation.Custom Properties Preserved ✅ 116ms
Format Validation.Event Has Timestamp ✅ 116ms
Retry Behavior.Retries On 503 ✅ 5328ms
Retry Behavior.Does Not Retry On 400 ✅ 2117ms
Retry Behavior.Does Not Retry On 401 ✅ 2115ms
Retry Behavior.Respects Retry After Header ✅ 8123ms
Retry Behavior.Implements Backoff ✅ 15443ms
Retry Behavior.Retries On 500 ✅ 5224ms
Retry Behavior.Retries On 502 ✅ 5224ms
Retry Behavior.Retries On 504 ✅ 5224ms
Retry Behavior.Max Retries Respected ✅ 15441ms
Deduplication.Generates Unique Uuids ✅ 124ms
Deduplication.Preserves Uuid On Retry ✅ 5222ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10332ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5229ms
Deduplication.No Duplicate Events In Batch ✅ 124ms
Deduplication.Different Events Have Different Uuids ✅ 115ms
Compression.Sends Gzip When Enabled ✅ 116ms
Batch Format.Uses Proper Batch Structure ✅ 112ms
Batch Format.Flush With No Events Sends Nothing ✅ 108ms
Batch Format.Multiple Events Batched Together ✅ 122ms
Error Handling.Does Not Retry On 403 ✅ 2115ms
Error Handling.Does Not Retry On 413 ✅ 2116ms
Error Handling.Retries On 408 ✅ 5222ms

Feature_Flags Tests

✅ 16/16 tests passed

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

@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch 3 times, most recently from b996dea to 047d564 Compare October 5, 2026 17:19
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 6, 2026 22:09
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 6, 2026 22:09
@turnipdabeets turnipdabeets changed the title chore!: adopt posthog-ios 4.0 and remove deprecated APIs for v6 chore!: Flutter Major Release v6 Oct 7, 2026
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 0ae4f04 to 9279d41 Compare October 7, 2026 00:31
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 5fced53 to 5022778 Compare October 7, 2026 20:01
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from e1927f4 to a700edb Compare October 8, 2026 15:45
@github-actions

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@github-actions github-actions Bot added the stale label Oct 16, 2026
@@ -0,0 +1,5 @@
---
"posthog_flutter": major

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should merge all changesets

@turnipdabeets turnipdabeets Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean into 1 large file? Does that change how it’s displayed? There’s different files since several PRs mrged into this one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this PR is the one merging to main, just one with the major changeset and then with all changes there makes more sense, easier to read, more summarized etc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll merge them before we merge this PR

Comment thread posthog_flutter/darwin/posthog_flutter.podspec
@marandaneto
marandaneto requested a review from a team October 21, 2026 11:49
@github-actions github-actions Bot removed the stale label Oct 22, 2026
@marandaneto
marandaneto marked this pull request as draft October 23, 2026 08:53
@marandaneto

Copy link
Copy Markdown
Member

moved to draft since its not at a mergeable state

turnipdabeets and others added 9 commits October 26, 2026 14:34
- Remove PostHogConfig.apiKey and the API_KEY manifest/Info.plist fallback.
- Remove getFeatureFlagPayload() across Dart, web and native handlers.
- Remove the debouncerDelay setter and PostHogDataMode.cellular.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
posthog-android has required minSdk 23 since 3.39.0, and the plugin's
dependency range [3.71.0, 4.0.0) only resolves to versions that need it.
Apps below 23 already fail the manifest merge, so this only corrects the
declared value.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Removes the names deprecated in 5.x in favor of optIn/optOut and
sendFeatureFlagEvent.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…#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) <[email protected]>
* chore!: rename platform enable/disable to optIn/optOut

PosthogFlutterPlatformInterface.enable()/disable() become optIn()/optOut()
to match the public Posthog API renamed in #636/#638. The method-channel
names sent to native stay 'enable'/'disable'.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* docs(changeset): cover direct platform callers in the opt-in/out rename

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
toMap() on the config classes and PostHogFeatureFlagResult.fromMap()
are the platform-channel wire format, not a user-facing data shape.
Move them to extensions and a top-level function in an unexported
src/utils/channel_serialization.dart so they drop out of the public API.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Raises the deployment targets to the posthog-ios 4.0 minimums ahead of
the SDK bump, so the bump itself only changes the dependency range.
Drops the availability checks that are now always true and moves the
CodeQL Swift job to Xcode 26.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Desktop landed on main after the v6 removals were written, so it still
implemented disable/enable, getFeatureFlagPayload and the sendEvent
parameter, and read config.sendFeatureFlagEvents.
getAllFeatureFlags (#665) decoded with PostHogFeatureFlagResult.fromMap,
which #646 made private, and the web feature events (#667) passed
sendEvent:, which #647 renamed to sendFeatureFlagEvent:.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
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