[D8] Subscription summary page incorrectly displays some subscriptions as non_renewing (Forward Port)

Created on 26 March 2021, about 4 years ago
Updated 7 February 2023, about 2 years ago

This issue has been fixed in 7.x, but needs forward port to 8.x.

See https://www.drupal.org/project/recurly/issues/3008748 β†’

Patch for review (should be added to this issue): https://www.drupal.org/project/recurly/issues/3008748#comment-13791423 β†’

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States JordanMagnuson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • @eojthebrave opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States eojthebrave Minneapolis, MN

    This new MR incorporates the fix from #4 for the 'non_renewing' subscription state. And adds tests for the RecurlySubscriptionList controller since it didn't previously have any. That, in addition to other things, validate this fix. I realize adding all those additional tests is probably overkill for this issue. But the test class didn't exist at all, and it felt silly to create the class with a test that only tests one of the many different possible 'states' a subscription can be in.

    Adding these tests also pointed out an issue with the call to `recurly_url()` in \Drupal\recurly\Controller\RecurlySubscriptionListController::subscriptionStateMessage for 'past_due' subscriptions. Which is fixed in this MR.

    In order to make the tests work I refactored the code in RecurlySubscriptionList that creates a static cache of the results from looking up an account's past due subscriptions. The refactored version allows the static cache to be reset. I also had to refactor the way that the RecurlyMockClient stores it's list of previously issued API requests because the current version doesn't allow you to check both 'HEAD', and 'GET' methods for the same URI because the array is keyed by URI instead of method.

  • Status changed to Fixed about 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States eojthebrave Minneapolis, MN
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024