Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GuzzleHttp 7 support #360

Closed
andrey-helldar opened this issue Jul 1, 2020 · 7 comments
Closed

GuzzleHttp 7 support #360

andrey-helldar opened this issue Jul 1, 2020 · 7 comments

Comments

@andrey-helldar
Copy link

Laravel since version 7.0 supports guzzlehttp/guzzle 7 versions.

The guzzlehttp/guzzle package released version 7.0.0 on June 27th.

Could you add support for your package?

@stayallive
Copy link
Collaborator

stayallive commented Jul 1, 2020

Hi @andrey-helldar, in time we can for sure. However we use HTTPlug under the hood and they have yet to release a Guzzle 7 adapter. I'm sure this will happen (issue/pr), but we have to wait for that at the moment. Since Guzzle 7 was released 5 days ago at the time of this comment, give it some time 😄

Edit: Also this will likely be fixed in https://github.com/getsentry/sentry-php-sdk and not in this package directly.

@andrey-helldar
Copy link
Author

In the package https://github.com/getsentry/sentry-php-sdk there is no way to create issue, so I opened it here in the parent project 🙂

Well, wait until they create the project 😊

@Brenneisen
Copy link

Hi @stayallive, I think since Guzzle 7 is PSR-18 compliant (php-http/guzzle6-adapter#73 (comment)) there is no need to use an adapter for HTTPlug. Maybe it is possible to use sentry/sentry directly with Guzzle 7 instead of sentry/sdk?

@stayallive
Copy link
Collaborator

Yes, you are correct @Brenneisen, although I've not tested this method you should be able to replace the sentry/sdk package and provide your own PSR-18 complaint package.

{
    "require": {
        "sentry/sentry-laravel": "^1.8",
        "http-interop/http-factory-guzzle": "^1.0",
        "php-http/guzzle6-adapter": "^1.1|^2.0"
    },
    "replace": {
        "sentry/sdk": "*"
    }
}

The above should be equal to just having:

{
    "require": {
        "sentry/sentry-laravel": "^1.8"
    }
}

And you should be able to pull out / replace the http-interop and php-http packages.

We provide sentry/sdk as a quick way to install the correct dependencies and I don't believe there is an easy way for us to allow both Guzzle 6 and 7 right now (using sentry/sdk), open for suggestions ofcourse.

@mfn
Copy link

mfn commented Aug 3, 2020

Hmm, this too is preventing from upgrading to Guzzle 7 as I've direct dependency in my application too:

$ ./composer.phar depends guzzlehttp/guzzle
laravel/laravel                     dev-master  requires  guzzlehttp/guzzle (^6.1)
aws/aws-sdk-php                     3.147.10    requires  guzzlehttp/guzzle (^5.3.3|^6.2.1|^7.0)
caseyamcl/guzzle_retry_middleware   v2.3.3      requires  guzzlehttp/guzzle (^6.3|^7.0)
google/apiclient                    v2.7.0      requires  guzzlehttp/guzzle (~5.3.1||~6.0||~7.0)
google/auth                         v1.11.1     requires  guzzlehttp/guzzle (^5.3.1|^6.2.1|^7.0)
laravel/slack-notification-channel  v2.1.0      requires  guzzlehttp/guzzle (^6.0|^7.0)
php-http/guzzle6-adapter            v2.0.1      requires  guzzlehttp/guzzle (^6.0)
wildbit/swiftmailer-postmark        3.1.0       requires  guzzlehttp/guzzle (^6.0.0)

The only other is https://github.com/wildbit/swiftmailer-postmark which has a PR ActiveCampaign/swiftmailer-postmark#27 but no one is doing anything there; but that package I can easily replace with a custom driver if must be.

But commercially depending on Sentry prevents me from just removing it 😅

@stayallive
Copy link
Collaborator

stayallive commented Aug 3, 2020

@mfn, for Postmark it's a bit "easier" since they directly depend on Guzzle and can just add 7.x as an allowed version. We have it a bit more complicated because we use a meta package to pull in the Guzzle integration but that uses HTTPlug to interface with Guzzle and that interface has not yet updated (and is not under out control) to be able to use Guzzle 7 (php-http/guzzle6-adapter#72).


If you want / must / require Guzzle 7 for some reason see here: #371 (comment).

@stayallive
Copy link
Collaborator

There is an workaround available (#360 (comment)) so I'm going to close this issue to track it on the main SDK repository since it's not only Laravel related but has effect on all PHP integrations.


See getsentry/sentry-php#1059 for progress updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants