Problem/Motivation
When running the tests using Drupal 9 (and 10) a bunch of deprecation warnings are triggered. Things like type hinting, and using assert methods that are deprecated (and removed in Drupal 10). We should get these cleaned up as part of making sure we can create a Drupal 10 compatible release.
Steps to reproduce
Run the test suite using Drupal 9.x.
Issue fork recurly-3326253
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
eojthebraveOn my local two of the tests fail when running with PHP8+ because of an issue in the v2 Recurly PHP client. https://github.com/recurly/recurly-client-php/issues/637, related to calling a deprecated library function. There's a PR to fix it, but it's been open for over a year so who knows ... https://github.com/recurly/recurly-client-php/pull/642 -- I think this an issue we will have to address but it's separate from this one. I think the long-term solution there is to update the module to use v3 of the Recurly PHP client, or to fork the v2 client.
So, I expect the tests to pass fine with PHP7.4 but have a 2 failures due to deprecations with PHP8. Let's see what the test bot says ...
Comment #4
eojthebraveThere we go. Sheesh. This now gets the tests currently included with this module passing in Drupal 9 with PHP7.4, 8.0, and 8.1. The issues addressed are:
I think the logic added to our tests for the Recurly client should be treated as "Hey, we know the Recurly client is throwing some deprecation notices, but it still works fine" And as long as you're suppressing deprecation notices on you live site it's fine. The issue is that phpunit doesn't have a way to 'suppress deprecations' so we have to tell it we know about them and we're okay with it.
Getting these tests fixed will allow us to do a couple things:
Comment #5
blakehall commentedThis looks good to me, and is also working on my local.
I think having solid (passing) test coverage across PHP versions is a good thing, and think this should be merged.
Comment #6
blakehall commentedComment #8
eojthebrave