Site-kit-wp: guzzlehttp/guzzle v6+ support in composer

Created on 12 Jul 2019  路  16Comments  路  Source: google/site-kit-wp

Hi, we currently use league/oauth2-client 2.4.1 which requires guzzlehttp/guzzle ^6.0, but this plugin requires guzzlehttp/guzzle ~5.3.3 and both 5 and 6 cannot be installed together.

Is there a way the plugin can switch to v6.0+, or otherwise relax the restriction?

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - ap/bc3-slack-integration dev-master requires league/oauth2-client 2.4.1 -> satisfiable by league/oauth2-client[2.4.1].
    - ap/bc3-slack-integration dev-master requires league/oauth2-client 2.4.1 -> satisfiable by league/oauth2-client[2.4.1].
    - league/oauth2-client 2.4.1 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2].
    - league/oauth2-client 2.4.1 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2].
    - Can only install one of: guzzlehttp/guzzle[6.0.0, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.0.1, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.0.2, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.1.0, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.1.1, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.2.0, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.2.1, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.2.2, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.2.3, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.3.0, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.3.1, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.3.2, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.3.3, 5.3.3].
    - Can only install one of: guzzlehttp/guzzle[5.3.3, 6.3.3].
    - google/google-site-kit 1.0.0-beta.1.0.1 requires guzzlehttp/guzzle ~5.3.3 -> satisfiable by guzzlehttp/guzzle[5.3.3].
    - Installation request for google/google-site-kit 1.0.0-beta.1.0.1 -> satisfiable by google/google-site-kit[1.0.0-beta.1.0.1].
    - Installation request for ap/bc3-slack-integration dev-master -> satisfiable by ap/bc3-slack-integration[dev-master].
Bug

All 16 comments

Hi,

Any updates please?

Thanks.

I am not sure what implications bumping the version number here has, would need some testing.

Looks like Guzzle here is required by the google/apiclient lib, which also supports Guzzle ^6.0, so we should be fine there.

The optimal solution would be to prevent any such conflicts. See #246, #41.

We choose to use Guzzle 5 is because support for PHP 5.4.
Guzzle 6 drop has minimum version of PHP 5.5.

More info: https://github.com/guzzle/guzzle#version-guidance

We choose to use Guzzle 5 is because support for PHP 5.4.
Guzzle 6 drop has minimum version of PHP 5.5.

More info: https://github.com/guzzle/guzzle#version-guidance

@ivankristianto: Can I ask to reconsider this decision? Wordpress requires PHP 5.6. since the release of WordPress 5 and over more than 90% of the WordPress users are using PHP 5.5+.

I have been trying to use Out-Of-Box Dropbox Plugin for Wordpress and ran into problems, we worked out the problem is related to Guzzle and the version you are using.

https://www.wpcloudplugins.com/plugins/out-of-the-box-wordpress-plugin-for-dropbox/

I think the developer of this plugin will be in touch as well :) but i am a customer of Out Of Box and having to stop using SiteKit for now :(

@The-Lion

Can I ask to reconsider this decision? Wordpress requires PHP 5.6. since the release of WordPress 5 and over more than 90% of the WordPress users are using PHP 5.5+.

A quick solution you can do currently is recompile from the source and make the PHP minimum version to PHP 5.6.
You can do that by modifying composer.json file, then package it (https://github.com/google/site-kit-wp/wiki/Releases#packaging-a-release).

re: considering to up the minimum PHP support version, I defer it to @felixarntz or @ThierryA

If we bump to Guzzle 6 there will just be problems with plugins that use Guzzle 5.

That's kind of a silly argument. "Let's not modernize and support a growing set of people because of another, shrinking set of people."

@archon810 See my previous comment on an alternative solution:

The optimal solution would be to prevent any such conflicts. See #246, #41.

We're now tracking work on this in #612.

We just merged the work on #612, so this should be fixed in the upcoming release.

This should be fixed in the latest rc.2 - please reopen if you still encounter issues with this.

@felixarntz The composer method still doesn't work for us though because it still requires 5.3.3.

https://github.com/google/site-kit-wp/blob/1.0.0/composer.json#L18

@archon810 I don't think we'll switch to Guzzle 6.x anytime soon because of the change in PHP version requirement. A possible workaround would be to require Site Kit 1.0.0 from WordPress.org via https://wpackagist.org/. Can you give that a try?

Just saw https://github.com/google/site-kit-wp/releases/tag/1.3.0 which says the minimum version of PHP is now 5.6.

Does it resolve this issue then? @swissspidy @ivankristianto

@archon810 I opened a new issue #1146 to discuss this again. But due to the scoping that is now in place, you should be fine with using something like --ignore-platform-reqs, as it won't make any difference anyway. For true Composer support I'd recommend following #41.

Was this page helpful?
0 / 5 - 0 ratings