How to apply and manage patches with composer.
First add the library ‘cweagans/composer-patches’ to your composer.json
Then under installer-paths in your composer.json add “patches”. “Patches” is then organized by modules. Here is an example:
"installer-paths": {
},
"patches": {
"drupal/commerce_shipping": {
"Commerce Shipping - Deleted Profile Error": "https://www.drupal.org/files/issues/2018-06-15/commerce_shipping-deleted-profile-error-2969540-6.patch",
"Patch Label": "https://path-to-patch'
}
}