Skip to content

Prepare for 12.0: upgrade guide, grouped changelog, Pay.mailer fix - #1277

Merged
excid3 merged 3 commits into
mainfrom
prepare-12-0
Sep 21, 2026
Merged

excid3 merged 3 commits into
mainfrom
prepare-12-0

Conversation

@excid3

@excid3 excid3 commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The three must-do items before cutting 12.0. The version bump itself is left for the release commit.

Upgrade guide. UPGRADE.md has 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 (a Pay::Error subclass) for unsupported operations, Pay::Stripe::Error on every Stripe call with cause for the original, RecordNotUnique replacing RecordInvalid on 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::Sync entry 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.constantize in a non-reloadable module, so after a code reload in development every Pay.mailer.with(...) call used the stale class. It now constantizes on each call, which is cheap. A new test stubs constantize to prove the result is not cached.

Softening #1272. Unsupported operations raise Pay::NotSupportedError < Pay::Error instead of NotImplementedError, so existing rescue Pay::Error blocks (such as Jumpstart Pro's cancel and pause controllers) keep catching them. Pay::Stripe::Subscription.sync_from_checkout_session and Pay::PaddleBilling::Subscription.sync_from_transaction come back as deprecated wrappers via a new Pay.deprecator, the Pay::Subscription.cancelled scope and Pay::Charge.sorted are restored, and Pay::Stripe.sync_checkout_session is documented for Checkout success pages.

Test plan

  • Full suite: 578 runs, 0 failures, 0 errors. standardrb clean.
  • CI green across Ruby 3.3–4.0, Rails 7.0–main, sqlite/postgres/mysql.

🤖 Generated with Claude Code

excid3 and others added 3 commits September 20, 2026 18:13
- 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>
@excid3
excid3 merged commit 6be80f7 into main Sep 21, 2026
37 checks passed
@excid3
excid3 deleted the prepare-12-0 branch September 21, 2026 17:17
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.

1 participant