br33f / php-GA4-Measurement-Protocol

PHP GoogleAnalytics4 Measurement Protocol Library
88 stars 19 forks source link

Fatal GuzzleHttp error #39

Open adrian-stein opened 1 year ago

adrian-stein commented 1 year ago

I have set all the code up and try to send either the send or sendDebug method and it throws the below error.

Fatal error: Declaration of GuzzleHttp\Psr7\Uri::withScheme($scheme) must be compatible with Psr\Http\Message\UriInterface::withScheme(string $scheme) in \vendor\guzzlehttp\psr7\src\Uri.php on line 14

Any ideas? I am running php 7.1.

br33f commented 1 year ago

Hi, what is your installed GuzzleHttp version ?

adrian-stein commented 1 year ago

Hey there,

composer.lock says these version. Do you know what version its been tested to and works on?

"name": "guzzle/guzzle",
"version": "dev-master",

"name": "guzzlehttp/guzzle",
"version": "6.5.x-dev",

"name": "guzzlehttp/promises",
"version": "1.5.x-dev",

"name": "guzzlehttp/psr7",
"version": "1.9.x-dev",
adrian-stein commented 1 year ago

I also just tried setting the version to the below and get the same issue

"br33f/php-ga4-mp": "0.1.3",
"guzzlehttp/guzzle": "6.5.8",
"guzzlehttp/promises": "1.5.3",
"guzzlehttp/psr7": "1.9.1"
br33f commented 11 months ago

Please try guzzlehttp/guzzle version ^7.0.0. I hope it will work.

adrian-stein commented 11 months ago

Nope. I still get the same error. have you got it working with similar settings?

adrian-stein commented 11 months ago

@br33f any word on this thanks??

br33f commented 11 months ago

@adrian-stein I have no idea i can not reproduce this error.