Skip to content

Commit 8eda134

Browse files
authored
Merge pull request #265 from Art4/add-deprecation-warnings-in-old-client
Add deprecation warnings in Redmine\Client
2 parents c5f19cd + 818ef5a commit 8eda134

File tree

3 files changed

+118
-19
lines changed

3 files changed

+118
-19
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525

2626
- `Redmine\Client::getCheckSslHost()` always returns as boolean
2727

28+
### Deprecated
29+
30+
- `Redmine\Client` is deprecated, use `Redmine\Client\NativeCurlClient` or `Redmine\Client\Psr18Client` instead
31+
- Magic getter in `Redmine\Client` is deprecated, use `Redmine\Client::getApi()` instead
32+
- `Redmine\Client::api()` is deprecated, use `Redmine\Client::getApi()` instead
33+
- `Redmine\Client::get()` is deprecated, use `Redmine\Client::requestGet()` instead
34+
- `Redmine\Client::post()` is deprecated, use `Redmine\Client::requestPost()` instead
35+
- `Redmine\Client::put()` is deprecated, use `Redmine\Client::requestPut()` instead
36+
- `Redmine\Client::delete()` is deprecated, use `Redmine\Client::requestDelete()` instead
37+
- `Redmine\Client::setCheckSslCertificate()` is deprecated, use `Redmine\Client::setCurlOption()` instead
38+
- `Redmine\Client::setCheckSslHost()` is deprecated, use `Redmine\Client::setCurlOption()` instead
39+
- `Redmine\Client::setSslVersion()` is deprecated, use `Redmine\Client::setCurlOption()` instead
40+
- `Redmine\Client::setUseHttpAuth()` is deprecated, use `Redmine\Client::setCurlOption()` instead
41+
- `Redmine\Client::setPort()` is deprecated, use `Redmine\Client::setCurlOption()` instead
42+
- `Redmine\Client::getResponseCode()` is deprecated, use `Redmine\Client::getLastResponseStatusCode()` instead
43+
- `Redmine\Client::setImpersonateUser()` is deprecated, use `Redmine\Client::startImpersonateUser()` and `Redmine\Client::stopImpersonateUser()` instead
44+
- `Redmine\Client::setCustomHost()` is deprecated, use `Redmine\Client::setCurlOption()` instead
45+
- `Redmine\Client::getUrl()` is deprecated, you should stop using it
46+
- `Redmine\Client::decode()` is deprecated, you should stop using it
47+
- `Redmine\Client::getCheckSslCertificate()` is deprecated, you should stop using it
48+
- `Redmine\Client::getCheckSslHost()` is deprecated, you should stop using it
49+
- `Redmine\Client::getSslVersion()` is deprecated, you should stop using it
50+
- `Redmine\Client::getUseHttpAuth()` is deprecated, you should stop using it
51+
- `Redmine\Client::getPort()` is deprecated, you should stop using it
52+
- `Redmine\Client::getImpersonateUser()` is deprecated, you should stop using it
53+
- `Redmine\Client::getCustomHost()` is deprecated, you should stop using it
54+
- `Redmine\Client::getCurlOptions()` is deprecated, you should stop using it
55+
- `Redmine\Client::prepareRequest()` is deprecated, you should stop using it
56+
- `Redmine\Client::processCurlResponse()` is deprecated, you should stop using it
57+
- `Redmine\Client::runRequest()` is deprecated, you should stop using it
58+
2859
## [v1.7.0](https://github.com/kbsali/php-redmine-api/compare/v1.6.0...v1.7.0) - 2021-03-22
2960

3061
### Added

docs/migrate-to-nativecurlclient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ This example shows how you can parse the response body of a DELETE request.
107107

108108
```diff
109109
-$dataAsString = $this->client->delete($path);
110-
+$this->client->requestDelte($path);
110+
+$this->client->requestDelete($path);
111111
+$dataAsString = $this->client->getLastResponseBody();
112112
```
113113

@@ -237,7 +237,7 @@ test your code without errors and now simply switch the client.
237237
```diff
238238
// Instantiate with ApiKey
239239
-$client = new \Redmine\Client(
240-
+$client = new \Redmine\Client\Prs18Client(
240+
+$client = new \Redmine\Client\NativeCurlClient(
241241
'https://redmine.example.com',
242242
'1234567890abcdfgh'
243243
);

0 commit comments

Comments
 (0)