Skip to content

Instantly share code, notes, and snippets.

@roma-glushko
Forked from amenk/README.md
Created June 19, 2018 09:21
Show Gist options
  • Save roma-glushko/7110eb9790996697f2fd38d42ba57684 to your computer and use it in GitHub Desktop.
Save roma-glushko/7110eb9790996697f2fd38d42ba57684 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