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

MessageFormatter::format has incompatible type declaration with Guzzle #148

Open
chescos opened this issue Jan 14, 2021 · 4 comments
Open

Comments

@chescos
Copy link

chescos commented Jan 14, 2021

I'm getting this error:

PHP Fatal error:  Declaration of RestCord\Logging\MessageFormatter::format(Psr\Http\Message\RequestInterface $request, $response = NULL, $error = NULL) must be compatible with GuzzleHttp\MessageFormatter::format(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseInterface $response = NULL, ?Throwable $error = NULL): string in /home/vagrant/code/vendor/restcord/restcord/src/Logging/MessageFormatter.php on line 45
@cryptiklemur
Copy link
Contributor

Can you please look into this @bumbummen99

@chescos
Copy link
Author

chescos commented Jan 15, 2021

Restcord currently supports Guzzle 6 and 7, I believe the MessageFormat implementation won't work for both versions because the format method changed its declaration with Guzzle 7. The error occurs when using Guzzle 7.

@bumbummen99
Copy link
Contributor

bumbummen99 commented Jan 16, 2021

Restcord currently supports Guzzle 6 and 7, I believe the MessageFormat implementation won't work for both versions because the format method changed its declaration with Guzzle 7. The error occurs when using Guzzle 7.

Yep, exactly that, we have to re add the type hints / revert daa7bdc. I'll create an PR 👍

Edit: Here is the PR #150

@cryptiklemur
Copy link
Contributor

Give dev-develop a try @chescos

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

3 participants