Skip to content

[in_app_purchase] Replaced deprecated ProrationMode with ReplacementMode #6403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

vongrad
Copy link
Contributor

@vongrad vongrad commented Mar 26, 2024

Replace deprecated ProrationMode in Android's billing client with ReplacementMode.

List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter#128957

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@vongrad
Copy link
Contributor Author

vongrad commented Mar 26, 2024

I had to update the versions in both in_app_purchase and in_app_purchase_android pubspec.yaml files, but now the in_app_purchase cannot resolve the in_app_purchase_android ^0.3.3 dependency when running your pipeline checks. What would be the right approach?

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

@vongrad It looks like you are changing the name of the ProrationMode class. This is a breaking change for the Android implementation, so it would need a major version bump (e.g. 0.4.0) if that is the goal of the PR.

Also, you are bumping the android implementation in packages/in_app_purchase/in_app_purchase/pubspec.yaml, but that version doesn't exist on pub.dev until this PR would land.

But overall I think we should actually deprecate ProrationMode on the Dart side and add ReplacementMode as a separate enum. And add it as a separate parameter in launchBillingFlow. This would give users time to transition without breaking them immediately.

Since this looks like it is only changing an Android specific method, you shouldn't need to change in_app_purchase in this PR.

@vongrad
Copy link
Contributor Author

vongrad commented Mar 27, 2024

@bparrishMines I agree that its probably better to introduce a new enum for ReplacementMode instead of placing it in as a replacement.
In this case, I suppose I should leave the version of in_app_purchase untouched and only increase the version of in_app_purchase_android. What would you prefer to have as a version number?

@bparrishMines
Copy link
Contributor

Since this is adding a new feature, this should bump in_app_purchase_android to 0.3.3.

@vongrad
Copy link
Contributor Author

vongrad commented Apr 7, 2024

Sure thing, I will submit a new PR during next week once I get some free time.

@vongrad
Copy link
Contributor Author

vongrad commented Apr 14, 2024

I made a new PR with the mentioned changes and in general re-worked it a bit. Please see here: #6515

auto-submit bot referenced this pull request May 22, 2024
…s billing client (#6515)

Introduced new `ReplacementMode` for Android's billing client and deprecated `ProrationMode`.

This PR is a follow-up on [https://github.com/flutter/packages/pull/6403](https://github.com/flutter/packages/pull/6403), where it was decided that we should not replace the `ProrationMode` with `ReplacementMode`, but instead only deprecate `ProrationMode`. The reason for a new PR is also that `in_app_purchase_android` version `0.3.3` changed internal platform communication to Pigeon, which meant I had to make major changes to my original PR.

*List which issues are fixed by this PR. You must list at least one issue.*
flutter/flutter#128957
TecHaxter referenced this pull request in TecHaxter/flutter_packages May 22, 2024
…s billing client (flutter#6515)

Introduced new `ReplacementMode` for Android's billing client and deprecated `ProrationMode`.

This PR is a follow-up on [https://github.com/flutter/packages/pull/6403](https://github.com/flutter/packages/pull/6403), where it was decided that we should not replace the `ProrationMode` with `ReplacementMode`, but instead only deprecate `ProrationMode`. The reason for a new PR is also that `in_app_purchase_android` version `0.3.3` changed internal platform communication to Pigeon, which meant I had to make major changes to my original PR.

*List which issues are fixed by this PR. You must list at least one issue.*
flutter/flutter#128957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants