Problem/Motivation
Steps to reproduce
Proposed resolution
Use upgrade_status module to identify changes. Make this module D10 compatible. Create patch.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3363000-12.patch | 2.12 KB | rsnyd |
| #10 | 3363000-10.patch | 1.79 KB | rsnyd |
| #8 | 3363000-8.patch | 1.39 KB | jsacksick |
| #7 | 3363000-7.patch | 1.28 KB | rsnyd |
| #2 | 3363000-2.patch | 958 bytes | rsnyd |
Issue fork commerce_shipstation-3363000
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 #2
rsnydComment #4
c_archer commentedComment #5
jsacksick commentedSo, this patch is not really correct as it should also drop D8 compatibility.
Symfony\Contracts\EventDispatcher\Event;doesn't exist on D8 since it's provided by thesymfony/event-dispatcher-contractspackage with is a dependency starting Drupal 9. So this patch should drop D8 compatibility.After this, #3343319: Update core_version_requirement in .info file. can probably marked as a duplicate.
Also you might want instead to use the bridge event class provided by Drupal core (See https://www.drupal.org/node/3159012 for explanations).
Comment #6
jsacksick commentedAlso, I'm pretty sure the tests themselves have to be updated to run on D10.
Comment #7
rsnyd@jsacksick,
Thank you for the helpful feedback. So I've changed the .info.yml file to drop the D8 compatability. ShipStationOrderExportedEvent now uses Drupal\Component\EventDispatcher\Event.
These two changes are included in the patch.
As for the tests, there is really only one that ShipStationKernelTestBase is the only class that contains real tests, i.e. not just stubs/function signatures. This test only references commerce_order, commerce_shipping, commerce_product and profile packages, so I don't think there's anything to do to get it to run on D10. The root composer.json, however, requires "drupal/commerce": "^2.17" and "drupal/commerce_shipping": "^2.1". Do these versions need to be updated to "drupal/commerce": "^2.36" and/or "drupal/commerce_shipping": "^2.6"?
Thank you for the help.
Comment #8
jsacksick commentedOh... I see the tests are just useless (just checked the code), there's an additional change required to properly support D10. In the link I sent, it is explained that the order of parameters changed when calling the dispatch() method on the event dispatcher.
Also, the bridge class has been introduced in Drupal core 9.1 (it is technically not there in 9.0).
Note that the patch you sent isn't applicable as is (it shouldn't be generated from the drupal root but you rather need to clone the module's repo, make your changes and then use the git diff command (See https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...).
Also had a quick look at the module in general and as far as I can see there are several coding standard issues, fixing these is probably not in the scope of this issue though... There's code commented out, calls to \Drupal:: from within services rather than using dependency injection (e.g:
\Drupal::moduleHandler()->alter('commerce_shipstation_order_xml')from ShipStation.php rather than$this->moduleHandlerComment #9
c_archer commentedLets create a ticket for the coding standards and I'm happy to pick up.
Comment #10
rsnyd@jsacksick,
Ok, my changes include the following:
I hope this one is correct. Thank you for taking the time to help me.
Comment #11
jsacksick commentedThe event dispatcher parameter change isn't present in your patch (see my patch), this breaks in D10.
Comment #12
rsnyd@jsacksick,
So sorry, I'm not sure how that happened.
Thank you again.
Comment #16
rwanthComment #18
c_archer commentedComment #19
c_archer commented