- edit the composer.json file to add a patch.
"extra": {
"enable-patching": true,
"patches": {
"drupal/core": {
"<patch1 information>": "<patch1 file path>",
"<patch2 information>": "<patch2 file path>"
}
}
}
composer install
After composer install
, sometimes composer.lock file might not be updated with latest patch information.
composer update --lock
This will generate composer.lock file from composer.json with latest patch additions.
Same steps used to apply patch for a module.