Problem/Motivation
I'm curious about the plan for Drupal 10 compatibility for this module.
We have a few sites that use it and are about to be upgraded to Drupal 10, but I have issues updating/installing the module on the updated codebase even with `mglaman/composer-drupal-lenient` package.
I'm suspecting it's due to other dependencies like php-http/guzzle6-adapter and guzzlehttp/guzzle, and I don't know exactly how to resolve this.
Any help would be appreciated.
What I'm currently getting:
Problem 1
- drupal/sparkpost 2.x-dev is an alias of drupal/sparkpost dev-2.x and thus requires it to be installed too.
- drupal/sparkpost[dev-2.x, 2.2.0] require php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1].
- php-http/guzzle6-adapter[v1.1.0, ..., v1.1.1] require guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but the package is fixed to 7.5.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires drupal/sparkpost ^2.2 -> satisfiable by drupal/sparkpost[2.2.0, 2.x-dev (alias of dev-2.x)].
I'm providing an initial patch for D10 compatibility that updates the core_version_requirement in the info file. It also broadens the php-http/guzzle6-adapter inspired by this issue which might help with the new compatibility with D10.
| Comment | File | Size | Author |
|---|---|---|---|
| initial-d10-compatibility.patch | 747 bytes | josip.rajkovic |
Issue fork sparkpost-3343783
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
Comment #2
josip.rajkovic commentedComment #5
mattjones86Put your patch into a merge request for easier testing with composer.
Comment #6
mattjones86Comment #7
mattjones86This will need more work because the 10.x core requires
guzzlehttp/guzzle:^7.0.This module requires
php-http/guzzle6-adapter, which has aguzzlehttp/guzzle:^6.0constraint, even on the latest version.Comment #9
eiriksmThanks for starting this!
It looks to me as if we're going to have to do a new major version for this, and only support d10 in it.
Updated the branch to also make sure the sub module sparkpost requeue is compatible
Comment #11
omarlopesinoTried to use it in a D9 site and got the following error: Message Error: Class "Http\Adapter\Guzzle6\Client" not found.
I've fixed it in this commit and now it works and the emails are sent.
I have to mention the problem that is hard to install the module with this changes as it uses guzzle 7, and rearranging all the libraries takes some time. There are a lot of drupal dependencies, specially dev ones (drupal core dev 9.5.10, drupal extension 4, lower versions of drush 11...) that uses guzzle 6.
I think we should make the module compatible with guzzle 6 and 7 so installing a version compatible with Drupal 10 is easier and do not require installing guzzle 7 in a Drupal 9 site. Working on it.
Comment #12
omarlopesinoI would like to propose a solution for this , let me know what do you think:
To let people know what steps must be done, it can be documented as an upgrade path.
Comment #13
clkeenan commentedI'm in the final stages of upgrading from D9 to 10. Curious if the above solution has been committed / will be committed?
Comment #14
eiriksmI am leaning towards making a new branch for d10.
The solution mentioned in #12 probably works. but it's kind of user unfriendly :) I mean, thanks so much for taking the time and writing it down, but the dependencies of this project really does make it messy to upgrade. Which is why I think upgrading in a new branch with d10 compatibility only, feels easier to both implement, but probably also to understand as a user
Personally I have been successfully upgrading with a patch from the MR here, so you could start with that if you need it. In the meantime, I will just start a new branch and get this MR targeted towards it
Comment #15
eiriksmComment #16
eiriksmI will just merge this now, since we can break BC in 3.x, the new branch. Please test, people watching this issue!
Thanks everyone for your contribution!
Comment #18
eiriksmComment #19
clkeenan commentedThank you!