Closed (fixed)
Project:
Commerce Stock
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2020 at 16:56 UTC
Updated:
1 Dec 2020 at 14:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
neslee canil pintoComment #3
mandclu commentedAccording to the warnings I'm seeing, all the submodules need the same fix.
Comment #4
suresh prabhu parkala commentedUpdated patch as per #3. Please review.
Comment #5
rajesh_jha commentedGreetings!
Requesting you to kindly release a new version of this module with Drupal 9 Compatibility as almost the Core Commerce module is already working with Drupal 9.Thanks and regards.
Comment #6
mrpauldriver commentedPatch at #4 would not apply
Comment #7
mrpauldriver commentedI checked this with Upgrade Status module and quite a lot a work seems to be required. Much more that just changing the core_version_requirement.
Comment #8
mandclu commented@MrPaulDriver for the errors about PHPUnit\Framework\TestCase being not found, is it possible you were running this without having drupal/core-dev installed?
Comment #9
guy_schneerson commentedThanks, Paul, I think this confirms things are probably ok. If we ignore the tests (as @mandclu was saying is probably an issue with running the tests), we only have two places using the deprecated function isSubclassOf() and that will only get removed in Drupal 10.
@MrPaulDriver can you have a look if the test issue is a setup one and if you can fix that re-run the report and update your comment with the results?
Comment #10
mrpauldriver commentedJust circling back round to this, sorry for the delay. Yes, I'll get this tested on against Drupal 8 again.
In the meantime I just found the module is not installable via composer against a Drupal 9 site, prior to patching.
An interim dev release would be a big help so that anyone starting a new commerce site doesn't have to start with 8, patch commerce_stock and then upgrade to 9. Even if it didn't work, at least it could be installed.
Comment #11
danharper commentedpatches above don't apply on latest dev, new patch attached with diff from #4
Comment #12
mrpauldriver commentedAfter patching with #11, two items needing attention remain, together with two others which can be ignored for now. I expect those to ignore relate to Drupal 10 as hinted by Guy at #9.
Comment #13
mrpauldriver commentedPatch for 2 current items outstanding.
Comment #15
mrpauldriver commentedTry again. Misplaced ; I think.
Comment #16
mrpauldriver commentedComment #17
mrpauldriver commentedComment #18
dave kopecekUsing composer & composer-patches I can apply #17 against a D8 site, however when applied against a D9 site it fails.
This is apparently a chicken-and-egg problem. Composer won't download commerce_stock because the existing dev version requires D8. The patch is what allows D9 compatibility & it hasn't been applied yet. Is there a magic composer command that will fix this? Do we just need to do a non-composer manual install and patch until this issue is resolved?
I know this isn't a problem with #17, but this is my first encounter with this dilemma and google is failing me.
Comment #19
mrpauldriver commentedYes this is a chicken and egg problem because the dev release can not be installed on Drupal 9 with composer. It therefore has to be patched for Drupal 8.9 first.
The latest patch does apply (with D8) and passes checks with Upgrade Status module, however it is currently failing tests here.
That your manual installation for D9 fails, suggests more work is needed.
Comment #20
danharper commentedTo test you need to add this to the composer file, this enables composer to download it.
"drupal/core": "9.0.6 as 8.9.6",I have attached another patch, this does apply using the above in composer and I have tested it with a clean install using commerce 2.x-dev (make sure you didn't already have commerce stock enabled otherwise it breaks)
Comment #21
danharper commentedComment #22
dave kopecekThanks @danharper for "drupal/core": "9.0.6 as 8.9.6". That did the trick.
- Patch 20 applies against a 9.0.6 site
- Patch 21 gives error:
Fatal error: Cannot make non static method Drupal\commerce_order\AvailabilityCheckerInterface::check() static in class Drupal\commerce_stock\StockAvailabilityChecker in /var/www/web/modules/contrib/commerce_stock/src/StockAvailabilityChecker.php on line 17Comment #23
danharper commentedNew patch attached with diff for #21 to this one.
Comment #24
danharper commentedNew patch to remove some changes below that are in several files.
Comment #25
mrpauldriver commentedPatch installs cleanly and passes tests with Upgrade Status module. Now needs verifying on a Drupal 9 installation.
Comment #26
danharper commentedChanging to needs review, I have tested local storage in a very basic way.
Comment #27
mrpauldriver commentedNo problem installing under Drupal 9.0.6 and Commerce 8.x-2.21
The module functionality seems okay, however I only tried a very basic configuration. I suggest if problems are discovered, these could be raised as separate issues.
Marking as RTBC.
Comment #28
agoradesign commentedwould be nice, if that could get committed soon please incl new release :)
Comment #29
promesI would like to start using this module in D9. When will there be a new release?
Thanks for the hard work.
Comment #30
dj12djdjs commentedI can also confirm this patch is working on 9.0.6.
Comment #31
guy_schneerson commentedHi, Sorry for the delay. will commit in the next couple of weeks and push a new release.
Comment #33
guy_schneerson commentedGreat work. I will push a new version over the weekend.
Comment #34
guy_schneerson commentedThe new release
https://www.drupal.org/project/commerce_stock/releases/8.x-1.0-alpha5