1

My Drupal version is 8.5.1, and yet when I run...

composer outdated drupal/*

It says "nothing to install or update".

What to do?

This is the relevant part of my composer.json...

"require": {
        "composer/installers": "^1.0.21",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/core": "^8.5"
    },

Looks fine to me, but composer says no update is available.

6
  • 3
    This can happen when composer is working off the cache. Running composer clearcache will clear the cache. Deleting composer.lock is NOT the recommended thing to do, as this can cause issues if you are working with other developers. composer.lock ensures that everyone is using the same versions of libraries.
    – Jaypan
    Commented Jul 17, 2018 at 13:09
  • Thanks Jaypan. I ran 'composer clearcache', but the the 'composer outdated' command still isn't working. It's now failing to recognize that I have modules that need updating.
    – arnoldbird
    Commented Jul 17, 2018 at 13:35
  • Actually, it now appears the module I'm trying to update is not required in composer.lock. So I need to run 'composer require drupal/token' in this case, to require the token module. However, that's not working. Composer says "Could not find a version of package drupal/token matching your minimum-stab ility". It says that whether I set the minimum stability to dev or to stable. This is an issue unto itself, so I'll create a new question or see if someone else has posted a relevant question re: 'composer require' not working.
    – arnoldbird
    Commented Jul 17, 2018 at 13:44
  • I got a resolution to the 'composer require' problem, which is perhaps also relevant to 'composer outdated': drupal.stackexchange.com/a/265913/8027
    – arnoldbird
    Commented Jul 17, 2018 at 14:40
  • Don't know if it would help in this case, but I always pin drupal/core to an exact version, and also use webflo/drupal-core-strict with an exact version. I do this out of precaution, but it can help with weirdness at times.
    – mpdonadio
    Commented Jul 18, 2018 at 0:53

1 Answer 1

1

Update: This is not a good answer. Leaving it here for reference, but this does not solve the underlying problem, whatever it is.

Fixed by deleting vendor and core directories and composer.lock and then running...

composer update drupal/core --with-dependencies

It seems there must be some circumstances when the 'composer outdated' command doesn't work, but it's still possible to upgrade.

1
  • 1
    This is a good answer.
    – leymannx
    Commented Jul 17, 2018 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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