Skip to content

Instantly share code, notes, and snippets.

@amenk
Created January 29, 2018 15:07
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amenk/908e80748662d896718685c778cd4db4 to your computer and use it in GitHub Desktop.
Save amenk/908e80748662d896718685c778cd4db4 to your computer and use it in GitHub Desktop.
How To Apply a Magento 2 Patch to your project
  • Find the commit a GitHub
  • Add .patch to the URL
  • Require vaimo/composer-patches
  • Add an entry like the above, with path-removal-level 5, to the composer.json
...
"require": {
"vaimo/composer-patches": "^3.0.0",
...
"extra": {
"magento-force": "override",
"patches": {
"magento/module-offline-shipping": {
"Bugfix Issue 11720 notice": {
"source": "https://github.com/magento/magento2/commit/f64281102c6c16b0e67d779d178054f179044187.patch",
"level": 5
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment