---
title: "Drupal 8: Applying Patches with Composer"
url: "https://michalak.world/posts/drupal-8-applying-patches-with-composer/"
description: "How to apply and manage patches with composer"
summary: "How to apply and manage patches with composer."
date: 2019-03-14
lastmod: 2026-08-19
tags: ["Drupal","Composer","Drupal 8","Drupal Development"]
section: "posts"
author: "Michael Michalak"
site: "https://michalak.world/"
---

# Drupal 8: Applying Patches with Composer

How to apply and manage patches with composer

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'
            }
        }
```

