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

Add PHP 8 support? #31

Open
tomkyle opened this issue Jan 12, 2021 · 2 comments · May be fixed by #32
Open

Add PHP 8 support? #31

tomkyle opened this issue Jan 12, 2021 · 2 comments · May be fixed by #32

Comments

@tomkyle
Copy link

tomkyle commented Jan 12, 2021

Support for PHP 8 should be added.

Cloning and installing under PHP 8 fails due to PHP ^7.2 version contraints of this package and the guzzlehttp/psr7@dev-master package required for development.

A fast shot allowing for ^7.2|^8.0 and modernizing to latest guzzlehttp/psr7@^1.7 will, however, break the unit tests as class GuzzleHttp\Psr7\HttpFactory seems to have disappeared (it's not in their 1.x branches at least).

As a workaround one can use nyholm/psr7; usage in unit tests then basically goes like this:

<?php
namespace MonologHttp\Tests\Unit\Twilio;

- use GuzzleHttp\Psr7\HttpFactory;
+ use Nyholm\Psr7\Factory\Psr17Factory;

return new TwilioHandler(
    $this->httpClient,
-   new HttpFactory(),
+   new Psr17Factory(),
    'sid',
    'secret',
    '+35790909090',
    '+306988008000'
);

See my fork: https://github.com/tomkyle/monolog-http
If this is considered useful, I'd happily contribute PR.

@gmponos
Copy link
Member

gmponos commented May 26, 2021

I am willing to accept a PR

@tomkyle tomkyle linked a pull request May 26, 2021 that will close this issue
@devployment
Copy link

Any progress here? Being interested in php8 support as well. Would be a starter to contribute to #33

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

Successfully merging a pull request may close this issue.

3 participants