How to apply a composer patch provided by Adobe

Last update: 2023-07-21
  • Topics:
  • Cache
    View more on this topic

This article instructs how to apply a composer patch for Adobe Commerce on-premises, Adobe Commerce on cloud infrastructure, and Magento Open Source.

WARNING

We strongly recommend applying and testing the patch on the Staging/Integration environment before applying it to Production. We also recommend you have a recent backup before any manipulations.

How to apply a composer patch for Adobe Commerce on cloud infrastructure

  1. If you do not have a directory named m2-hotfixes in the project root, please create one.

  2. Copy the %patch_name%.composer.patch file(s) to the m2-hotfixes directory.

  3. Add, commit, and push your code changes:

    git add -A
    
    git commit -m "Apply %patch_name%.composer.patch patch"
    
    git push origin
    

For additional information about applying patches to Cloud projects, see Apply patches in our developer documentation.

How to apply a composer patch for Adobe Commerce on-premises and Magento Open Source

  1. Upload the patch to your Adobe Commerce on-premises or Magento Open Source root directory.

  2. Run the following SSH command:

    patch -p1 < %patch_name%.composer.patch
    

    (If the above command does not work, try using -p2 instead of -p1 )

  3. For the changes to be reflected, refresh the cache in the Admin under System > Cache Management.

On this page