Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on dbupdate after composer update #29

Open
nigelwhite opened this issue Apr 6, 2019 · 3 comments
Open

error on dbupdate after composer update #29

nigelwhite opened this issue Apr 6, 2019 · 3 comments

Comments

@nigelwhite
Copy link

$ composer update --with-dependencies drupal/commerce drupal/commerce_price drupal/commerce_product drupal/commerce_order drupal/commerce_payment drupal/commerce_payment_example drupal/commerce_checkout drupal/commerce_tax drupal/commerce_cart drupal/commerce_log drupal/commerce_store drupal/commerce_promotion
$ vendor/drush/drush/drush updb

Module Update ID Type Description


commerce_product 8206 hook_update_n Set the 'published' entity key for variations.
commerce_product 8207 hook_update_n Update the variation 'status' field.
commerce_promotion 10 post-update Re-save order item promotions to populate the display_included field.

PHP Fatal error: Declaration of Drupal\commerce_promotion\Entity\Promotion::apply(Drupal\commerce_order\Entity\OrderInterface $order) must be compatible with Drupal\commerce_promotion\Entity\PromotionInterface::apply(Drupal\commerce_order\Entity\OrderInterface $order, ?Drupal\commerce_promotion\Entity\CouponInterface $coupon = NULL) in /home/qpc/docker-sites/ddev/demos/commerce-demo/web/modules/contrib/commerce/modules/promotion/src/Entity/Promotion.php on line 75
[error] Drush command terminated abnormally due to an unrecoverable error.
Error: Declaration of Drupal\commerce_promotion\Entity\Promotion::apply(Drupal\commerce_order\Entity\OrderInterface $order) must be compatible with Drupal\commerce_promotion\Entity\PromotionInterface::apply(Drupal\commerce_order\Entity\OrderInterface $order, ?Drupal\commerce_promotion\Entity\CouponInterface $coupon = NULL) in /home/qpc/docker-sites/ddev/demos/commerce-demo/web/modules/contrib/commerce/modules/promotion/src/Entity/Promotion.php, line 75

site broken

Its hard to tell now which version I was updating from, but I think it was commerce: 2.11.0 and trying to go up to 2.13.
In Drupal 8.6.13

@ghost
Copy link

ghost commented Apr 8, 2019

Hmmm. You could try updating via update.php instead of with drush. Also, try drush entup.

@thegbomb
Copy link

thegbomb commented May 9, 2019

Patches need updating:

         "patches": {
             "drupal/commerce": {
                 "#2770731: Add a display name to promotions":
-                "https://www.drupal.org/files/issues/2018-07-23/adjustment_label-2770731-44.patch",
+                "https://www.drupal.org/files/issues/2019-04-15/adjustment-label-update-2770731-51.patch",
                 "#2852207: Billing same as shipping":
-                "https://www.drupal.org/files/issues/2018-05-23/commerce_checkbox-same-as-billing_2852207_166.patch",
-                "#2938760: Variation fields can permanently disappear during ajax replacement":
-                "https://www.drupal.org/files/issues/2018-10-31/2938760-20.patch"
+                "https://www.drupal.org/files/issues/2018-05-23/commerce_checkbox-same-as-billing_2852207_166.patch"
             },

#2852207: Billing same as shipping isn't applying either but it looks like there are bigger things to solve in that issue and so there isn't a patch to replace this one, however the site doesn't seem to have the above fatal errors without it being applied.

@thegbomb
Copy link

thegbomb commented May 9, 2019

The other way to fix it is to pin commerce to version 2.11 where the patches seem to still apply:

-        "drupal/commerce": "^2.9",
+        "drupal/commerce": "2.11",

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

No branches or pull requests

2 participants