I'm trying to update my site from D9 to D10, I've had quite a lot of modules to go through, and for the most part a lot of them have releases which are stable for D10, but roughly 4-5 of them only have the auto-generated patch (which I've referenced in the composer.json file)

Except for some reason composer doesn't seem to acknowledge the local patched version when I'm trying to update Drupal Core

if I run composer update -W I get errors like this

- drupal/pdf[1.1.0, ..., 1.x-dev] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).

So then I ran composer show drupal/pdf to get

name     : drupal/pdf
descrip. : Display PDF file in Drupal without external readers and plugins.
keywords : 
versions : * 1.1.0
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/pdf
source   : [git] https://git.drupalcode.org/project/pdf.git 8.x-1.1
dist     : [zip] https://ftp.drupal.org/files/projects/pdf-8.x-1.1.zip 8.x-1.1
path     : /var/www/html/docroot/modules/contrib/pdf
names    : drupal/pdf

source : https://git.drupalcode.org/project/pdf

drupal/core ^8 || ^9

Obviously I can see the bottom line appears to be what it's failing from, but I have already installed the patch locally via composer which fixes this, and I can even see that my locally installed file says

core_version_requirement: ^9.3 || ^10

Is there anything I have to do other than reference the patch file for the D10 upgrade for these custom modules?


1 Answer 1


composer update is run before patches are applied, which is why your patch is not working, as it is not seeing the patched version yet, and therefore finds incompatibilities.

See this link for information on how to deal with this issue: https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient-composer-endpoint

  • 1
    Perfect, that's great, thank you! May 16 at 16:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.