Score:-4

Unable to apply a user.module Core patch in Drupal 7.x site using Composer

fr flag

I have a patch https://www.drupal.org/files/user_reset_password_privacy-1521996-10.patch, which is to be applied to user.module using Composer. I have added the URL under "patches" as well.

"patches" : {
   "drupal/module" : {
     "string" : "patch_link"
  }
}

After running the command composer update drupal/core I am getting:

Nothing to install or update

Need expert assistance here on where I am going wrong here.

cn flag
Not sure about D7, but patches for D8/D9 core modules should be applied with `composer update drupal/core`-- try that instead.
fr flag
@PatrickKenny I am updating using the above command but still getting **Nothing to install or update**
leymannx avatar
ne flag
You need to run `composer install` to get the patch applied, not `composer update`. Does your composer.json contain `cweagans/composer-patches` in the `"require"` section? `composer --version` returns you what version? Please post the whole content of your composer.json in your question.
leymannx avatar
ne flag
We need the whole composer.json. Maybe your site isn't even managed by Composer. Just a composer.json exists which isn't even connected to your Drupal at all.
Score:2
id flag

It should be drupal/core in the patches section of composer.json, not drupal/module.

patches must be nested under extra. I cannot determine from the question as written if that is the case.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.