-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update Symfony HttpClient implementation for v6.* and PHP to 8.0 #96
Update Symfony HttpClient implementation for v6.* and PHP to 8.0 #96
Conversation
Awesome, thank you for this PR @NicolasDievart! This PR drops PHP 7.x support, so I'm planning to release this PR as a major version up, Note for self: PHP 7.4 is in security support (until 28 Nov 2022): PHP: Supported Versions I think it's okay to drop 7.x as the 7.x reaches EOL in 3 months. |
Oh, the tests on GitHub Actions are failing... PHP 7.x will no longer supported since this pull request, could you please remove 7.x from this GitHub Actions workflow? |
Hi 👋 Sorry, I couldn't test the github action on my side, just runned the test against PHP 8 on my local env. I fear I can't just drop 7.4 from the github action after a small investigation.
https://github.com/php-coveralls/php-coveralls seems to be compatible now However, the php-vcr/phpunit-testlistener-vcr is still not compatible with PHP 8. |
Yeah, regarding |
The coverage decrease seems due to here 👀 : https://coveralls.io/builds/52000155/source?filename=src%2FGanesha%2FGaneshaHttpClient.php#L101 @NicolasDievart |
I added unit test for the withOptions method (inspired by the test from HttpClient directly https://github.com/symfony/symfony/blob/6.2/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php#L1122) I added an http call on the server docker container, don't know if useful or not ? |
Nice. ✨ I have made a small change to do a more strict test: aab5494 |
The test with https://github.com/ackintosh/ganesha/runs/8085719168?check_suite_focus=true
As far as I investigated, - "symfony/http-client": "^4.3|^5.0|^6.0",
+ "symfony/http-client": "^5.3|^6.0", |
because `withOptions()` is implemented since v5.3
Thank you very much for your help 👍 |
Released this as v3.0.0. 🎉 Again, thank you for your contribution @NicolasDievart! |
By the way, please consider adding your company to the list if you don't mind. 🙂 |
Hi !
As of Symfony/HttpClient 5.3, the withOptions function was introduced and it is, therefore, mandatory, if you want to upgrade to the last version of Symfony/HttpClient
Symfony 6 also requires PHP 8 (and for the implementation of the withOptions function with the static return), I bumped the minimum required version to 8.0. I can go to 8.1 if you prefer, but don't know the other usages of Ganesha (other than HttpClient) and don't want to break anything.