I have encountered a weird issue in which a patch I rolled for Commerce does not apply with Composer; it gives no errors, but the patch is not actually applied.
"extra": { "patches": { "drupal/commerce" : { "Allow order types to have no cart": "https://www.drupal.org/files/issues/commerce-direct-checkout-2.2-2810723-36.patch" },
However, the same patch applies correctly after downloading and using the patch
command:
/web/modules/contrib/commerce$ patch -p1 < ../../../../patches/commerce-direct-checkout-2.2-2810723-36.patch patching file modules/cart/src/Form/AddToCartForm.php patching file modules/cart/tests/src/Functional/AddToCartFormTest.php patching file modules/cart/tests/src/Functional/CartBrowserTestBase.php patching file modules/product/config/schema/commerce_product.schema.yml patching file modules/product/config/schema/commerce_product.schema.yml.orig patching file modules/product/src/Plugin/Field/FieldFormatter/AddToCartFormatter.php patching file modules/product/src/ProductLazyBuilders.php
What is wrong with my patch that makes it fail in Composer?