Closed DimionX closed 1 year ago
@DimionX Thank you for this PR!
The tests with --prefer-lowest
have failed with the error:
https://github.com/ackintosh/ganesha/actions/runs/5200076716/jobs/9482744646?pr=104
1) Ackintosh\Ganesha\GuzzleMiddlewareTest::reject Failed asserting that exception of type "Error" matches expected exception "Ackintosh\Ganesha\Exception\RejectedException". Message was: "Class "GuzzleHttp\Promise\Create" not found"
This tells us that we should support the both promise_for
and Create::promiseFor
. I think it has been done with the code like:
if (class_exists('\GuzzleHttp\Promise\Create')) {
return call_user_func('\GuzzleHttp\Promise\Create::rejectionFor', ...);
} else {
return call_user_func('\GuzzleHttp\Promise\rejection_for', ...);
}
(this is just for example, there may exist a cleaner way)
I will add commits to this Pull Request to fix the error with --prefer-lowest
. Please give me a little time.
@DimionX I have updated your Pull Request to fix an error detected by CI, now the tests on CI have passed. Could you try the updated one to check if the problem you reported has been fixed on your environment?
@ackintosh Thanks! The problem is solved, now everything is fine
@DimionX This PR has been released as v3.1.1. 🎉 Thank you for your contribution! https://github.com/ackintosh/ganesha/releases/tag/3.1.1
Guzzle Promises: A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0.
https://github.com/guzzle/promises#upgrading-from-function-api