Problem/Motivation

Drupal core and drush both support some version guzzlehttp/guzzle 7. When a module maintainer has a similar requirement, their module is compatible with Drupal 9.5.1. However, when attempting to install one of these packages via composer (which has drupal/core-recommended as a recommended package for all drupal projects managed by composer), the installation/upgrade fails. For example: drupal/geocoder:^4.0 is marked as ready for Drupal 10, but cannot be installed on a composer-managed site due to this requirement (php-http/guzzle7-adapter which has guzzle 7 as a dependency).

Steps to reproduce

Try installing drupal/core-recommended and any project which requires guzzlehttp/guzzle:^7.4

Proposed resolution

Add support for guzzle 7.

```
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
```

I would have added this issue on the github repo, but that repo seems closed for issue creation. I can only assume that this is the place for such requests.

Issue fork drupal-3332324

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loopy1492 created an issue. See original summary.

loopy1492’s picture

Issue summary: View changes
loopy1492’s picture

Terribly sorry @idebr and @ciefen. I definitely searched for the core-recommended keyword and others in the issue queue. I should have used google search instead; I should know better. LOL

And yeah, this site is on PHP 8.1. But the requirement is also on a different dependency. I suspect we'll start seeing this pop up more and more.

loopy1492’s picture

So would the recommendation, in this case, be to look at the drupal/core-recommended dependencies, make value judgements on the versions I have installed from there now, set them in composer.json as needed, and remove the drupal/core-recommended dependency in favor of just drupal/core instead?

cilefen’s picture

larowlan’s picture

Category: Bug report » Support request
Issue tags: +Bug Smash Initiative

Fwiw there are helpful folks in the #composer channel in the Drupal slack that will help with getting around these curly ones.

I just went through this last week and yeah it was a bit of pinning in my composer.json, updating, unpinning.

loopy1492’s picture

Thanks. I'll see what I can do.

loopy1492’s picture

Yeah. That's not great.

I'll just wait until drupal/core-recommended:10.x is released and we're ready to make the final jump to 10 before upgrading geocoder. The cascade of dependency issues is brain-meltingly bonkers.

loopy1492’s picture

larowlan’s picture

Here's my bash history from when I needed to get to Guzzle 7 on Drupal 9.
I've added some comments

// Q. Why is guzzle installed?
composer show guzzlehttp/guzzle
// A. fabpot/goutte

// Q. Why is fabpot/goutte installed?
composer why fabpot/goutte
// A. behat/mink-goutte-driver

// Q. Why is behat/mink-goutte-driver installed?
composer why behat/mink-goutte-driver
// A. weitzman/drupal-test-traits

// Q. Is there a newer version of weitzman/test-traits
composer show -a weitzman/drupal-test-traits
// A. yep, a v2

// Update to v2 of that
composer require --dev weitzman/drupal-test-traits:~2

// Q. Check if behat/mink-goutte-driver is still installed
composer why behat/mink-goutte-driver
// No it's not  🎉

// Q. And can I go to v7 of guzzlehttp/guzzle?
composer why-not guzzlehttp/guzzle 7

// 🎉 Yep! No more blockers, update everything and let my test coverage make sure there's no issues
composer update -W
loopy1492’s picture

Thanks, @larowlan, I'll look into it.

I do wish composer's output was laid out a bit differently to how my brain works. I still have a very hard time determining cause and effect with how error output is laid out.

But I am super dubious about REMOVING core-recommended just for this short period between Drupal 9.5.x and Drupal 10. I really don't like the idea of stripping it away. It really seems super weird that Drupal 9.5.x, being key to the upgrade path to 10.x, core-recommended 9.5.x isn't also using Guzzle 7.

It is literally recommeded. Not just recommended, but required.

rraney’s picture

Any resolution to this? I'm trying to update Geocoder for Drupal 10, and I'm fairly certain this is what's blocking its compatibility.

larowlan’s picture

@rraney this is a fixed issue. I recommend joining slack and asking in the #composer channel if you've got specific issues updating

rraney’s picture

I posted in Slack, but I'd like to know the solution. The one that's shown on Geocoder's home page doesn't work for me. The only solution I've seen is to change "core-recommended" to "core" in composer.json. I don't feel like this is an acceptable solution because people may prefer to use core-recommended. The suggestion on the Geocoder home page was not sufficient for me on Drupal 9.