Score:0

psr/log requires PHP 8

in flag

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?

cn flag
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?
Score:3
fr flag

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.

Score:2
us flag

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.

pglatz avatar
in flag
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?
apaderno avatar
us flag
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.
Kevin avatar
in flag
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.
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.