-
Couldn't load subscription status.
- Fork 180
[poc] new low-level API client #357
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## v2.x #357 +/- ##
============================================
+ Coverage 96.57% 96.71% +0.13%
- Complexity 492 534 +42
============================================
Files 27 27
Lines 1373 1459 +86
============================================
+ Hits 1326 1411 +85
- Misses 47 48 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
This PR is a proof of concept for a new simplified HTTP client described in #341 as a replacement for the
Redmine\Client\Clientinterface. The new methodRedmine\Http\HttpClient::request(string $method, string $path, string $body = ''): Redmine\Http\Responsewill replace these method calls :Redmine\Client\Client::requestGet(string $path): bool;Redmine\Client\Client::requestPost(string $path, string $body): bool;Redmine\Client\Client::requestPut(string $path, string $body): bool;Redmine\Client\Client::requestDelete(string $path): bool;Redmine\Client\Client::getLastResponseStatusCode(): int;Redmine\Client\Client::getLastResponseContentType(): string;Redmine\Client\Client::getLastResponseBody(): string;All classes extending the
Redmine\Api\AbstractApiclass also do not require theses methods anymore:Redmine\Client\Client::getApi(string $name): ApiThis all have been done in a BC way. The next step will be to create a real
Redmine\Http\HttpClientimplementation and deprecate theRedmine\Client\Clientinterface and theRedmine\Client\NativeCurlClientandRedmine\Client\Psr18Clientclasses.