We just released Shipping 2.0-beta8, the last shipping beta.
With that release out of the way, we proceeded with two necessary backwards compatibility breaks, in preparation for RC1:
#3096883: [Backwards Compatibility break] Rework and expand ShippingRate
#3106301: [Backwards Compatibility break] Inject the workflow manager into ShippingMethodBase

All shipping method plugins need to be updated for the two changes, and the module's composer.json file should be updated to require commerce_shipping "^2.0-rc1", once the RC1 release is out.

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs work
StatusFileSize
new4.76 KB

Here is an initial patch.

Unfortunately it doesn't work as-is, because the ShippingRate object now expects to receive the shipping method entity ID ($this->parentEntity->id()), which is not available in the request services that USPS uses. I was unsure how to pass that along from the plugin, the existing architecture confuses me a bit, so I'm leaving that to the maintainer.

mglaman’s picture

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new14.71 KB

Here's a working patch. \Drupal\commerce_usps\USPSRateRequestInterface::getRates now required the shipping method entity and that gets the ID passed down to the rate.

mglaman’s picture

Title: Update for Shipping 2.x-dev (post-beta8) » Update for Shipping 2.0-rc1
StatusFileSize
new14.71 KB

RC1 is released

rhovland’s picture

Tested on latest commerce 2.x-dev and commerce_shipping 2.x-dev and it works as expected.

mglaman’s picture

Status: Needs review » Fixed

Thanks for testing, @rhovland! Committed.

  • mglaman committed 55d5c53 on 8.x-1.x
    Issue #3109828 by mglaman, bojanz, rhovland: Update for Shipping 2.0-rc1
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.