0

I'm running Drupal 8.9.16 with PHP 7.4.12 While attempting to run composer update today I saw this error for the first time:

  Problem 1
    - Root composer.json requires psr/log dev-master -> satisfiable by psr/log[dev-master].
    - psr/log dev-master requires php >=8.0.0 -> your php version (7.4.12) does not satisfy that requirement.
  Problem 2
    - psr/log dev-master requires php >=8.0.0 -> your php version (7.4.12) does not satisfy that requirement.
    - backupmigrate/core dev-master requires psr/log dev-master -> satisfiable by psr/log[dev-master].
    - Root composer.json requires backupmigrate/core dev-master -> satisfiable by backupmigrate/core[dev-master].

I'm not sure what these mean; do I need to update to PHP 8? According to https://www.drupal.org/docs/system-requirements/php-requirements it is not supported by Drupal 8. This sounds like a good time to update to 9, which I planned on doing soon anyway. Are there issues I will be running up against if I upgrade?

1
  • I suppose the question is why are you requesting the dev-master version of psr/log in the first place? Why not just fix it to a version that your environment supports?
    – Clive
    Jul 15, 2021 at 19:15

2 Answers 2

3

Root composer.json requires psr/log dev-master

Well, that's not something that Drupal requires. Drupal specifies "psr/log": "^1.0" in both Drupal 8.x and Drupal 9.x. If dev-master is in your composer.json, then you had to put it there yourself.

2

That composer.json file requires the Backup and Migrate Core library which, in its composer.json file, is identified as backupmigrate/core. That library requires psr/log dev-master, while Drupal 8 in its composer.json file requires psr/log ^1.0.

Probably that library is added in that composer.json file because it's required from the Backup and Migrate for Drupal 8 module, but it's not required from Drupal core.

The Backup and Migrate Core library and the Backup and Migrate for Drupal 8 module haven't been update in at least 4 years. Probably, at the time of the last commit, the psr/log (dev-master) library didn't require PHP 8.
They should update their dependencies and require a different version of psr/log.

The Backup and Migrate module hosted on drupal.org doesn't have that problem, as its composer.json file doesn't require a version of the psr/log library different from the version required by Drupal core. The Backup and Migrate Core library is included together the module and it uses the same version of psr/log required from Drupal core.
If you need the Backup and Migrate module, you should use the version hosted on drupal.org, not the version hosted on github.com.

3
  • Thanks to all for the help; I removed the dev-master dependencies, uninstalled and removed backup/migrate and reinstalled it in custom. Very pleased. One more thing; before I install Drupal 9, I'm thinking of just running composer on my local (where I do development) and putting all files in git, so I wouldn't need to run composer on my live and qa remove sites. Half the place I've looked at about this says to use composer on remotes, others say to just use git. I'd prefer not using composer on the live site, since it is a bit slower and can have problems. Any reason not to use git for update?
    – pglatz
    Jul 15, 2021 at 21:51
  • 1
    You can also do how you described. For sites on shared hosts, you cannot run Composer on the host, since they don't normally give you SSH access to execute commands from the terminal.
    – apaderno
    Jul 16, 2021 at 7:04
  • 2
    You can build the site on CI (GitLab, GitHub Actions, Circle, Travis, etc) and commit that result to a branch and push that branch to remote.
    – Kevin
    Jul 16, 2021 at 11:02

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.