Prepare for 12.0: upgrade guide, grouped changelog, Pay.mailer fix - #1277
Merged
Merged
Conversation
- UPGRADE.md gains a Pay 12.0 section covering every breaking change in the unreleased set: the removed methods with replacements, NotImplementedError for unsupported operations, Pay::Stripe::Error everywhere, RecordNotUnique on duplicates, the webhook controller extension points, regenerating the SCA view, and the Lemon Squeezy data update (moved from a 11.9 heading). - The Unreleased changelog is grouped into Breaking changes, Fixes and Improvements, and the duplicated Pay::Sync entry left over from the #1270 to #1276 replacement is removed. - Pay.mailer no longer memoizes the constantized class. The memo lived in a non-reloadable module, so development reloads returned a stale mailer class. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jumpstart Pro's billing page calls pay_charges.sorted, so removing it breaks every app built on it. Restore the scope, drop it from the 12.0 removals, and add a test so it isn't flagged as dead code again.
…ethods Unsupported operations now raise Pay::NotSupportedError, a subclass of Pay::Error, instead of NotImplementedError. Apps that wrap these calls in `rescue Pay::Error` (Jumpstart Pro's subscription cancel and pause controllers do) caught the old Pay::Error on Lemon Squeezy and would have started returning 500s. Braintree pause and change_quantity and Paddle Classic change_quantity move over too, so every processor uses one error. Pay::Stripe::Subscription.sync_from_checkout_session and Pay::PaddleBilling::Subscription.sync_from_transaction come back as deprecated wrappers around Pay::Stripe.sync_checkout_session and Pay::PaddleBilling.sync_transaction, to be removed in Pay 13. Adds Pay.deprecator, registered with the app on Rails 7.1+. Restores the Pay::Subscription.cancelled scope to match the cancelled? predicate, and documents sync_checkout_session for Checkout success pages. Co-authored-by: Claude Opus 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.
Summary
The three must-do items before cutting 12.0. The version bump itself is left for the release commit.
Upgrade guide.
UPGRADE.mdhas a new Pay 12.0 section. It covers each breaking change in the unreleased set: a table of removed methods and their replacements,Pay::NotSupportedError(aPay::Errorsubclass) for unsupported operations,Pay::Stripe::Erroron every Stripe call withcausefor the original,RecordNotUniquereplacingRecordInvalidon duplicates, the webhook controller extension points for anyone who subclasses them, regenerating the SCA view, and the Lemon Squeezy data update. The Lemon Squeezy note previously sat under a "Pay 11.9" heading.Changelog. The Unreleased section is regrouped into Breaking changes, Fixes, and Improvements instead of merge order, and the
Pay::Syncentry that appeared twice (a leftover from replacing #1270 with #1276) is now one entry. The Breaking section links to the upgrade guide.Pay.mailer. It memoized@@mailer.constantizein a non-reloadable module, so after a code reload in development everyPay.mailer.with(...)call used the stale class. It now constantizes on each call, which is cheap. A new test stubsconstantizeto prove the result is not cached.Softening #1272. Unsupported operations raise
Pay::NotSupportedError < Pay::Errorinstead ofNotImplementedError, so existingrescue Pay::Errorblocks (such as Jumpstart Pro's cancel and pause controllers) keep catching them.Pay::Stripe::Subscription.sync_from_checkout_sessionandPay::PaddleBilling::Subscription.sync_from_transactioncome back as deprecated wrappers via a newPay.deprecator, thePay::Subscription.cancelledscope andPay::Charge.sortedare restored, andPay::Stripe.sync_checkout_sessionis documented for Checkout success pages.Test plan
standardrbclean.🤖 Generated with Claude Code