How to apply a composer patch provided by Adobe
This article instructs how to apply a composer patch for Adobe Commerce on-premises, Adobe Commerce on cloud infrastructure, and Magento Open Source.
How to apply a composer patch for Adobe Commerce on cloud infrastructure cloud
-
If you do not have a directory named
m2-hotfixes
in the project root, please create one. -
Copy the
%patch_name%.composer.patch
file(s) to them2-hotfixes
directory. -
Add, commit, and push your code changes:
code language-git git add -A
code language-git git commit -m "Apply %patch_name%.composer.patch patch"
code language-git 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 commerce
-
Upload the patch to your Adobe Commerce on-premises or Magento Open Source root directory.
-
Run the following SSH command:
code language-bash patch -p1 < %patch_name%.composer.patch
(If the above command does not work, try using
-p2
instead of-p1
) -
For the changes to be reflected, refresh the cache in the Admin under System > Cache Management.