-
Notifications
You must be signed in to change notification settings - Fork 182
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
Deprecate AbstractApi::get()
#381
Deprecate AbstractApi::get()
#381
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v2.x #381 +/- ##
============================================
+ Coverage 97.63% 97.71% +0.07%
- Complexity 563 589 +26
============================================
Files 29 29
Lines 1609 1707 +98
============================================
+ Hits 1571 1668 +97
- Misses 38 39 +1 ☔ View full report in Codecov by Sentry. |
…t-abstractapiput-and-abstractapidelete
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9556153 | Triggered | Generic High Entropy Secret | 97b80d9 | tests/Behat/features/wiki.feature | View secret |
9556153 | Triggered | Generic High Entropy Secret | 97b80d9 | tests/Behat/features/wiki.feature | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
AbstractApi::get()
…-abstractapiput-and-abstractapidelete
AbstractApi::get()
does not allow to specify the content type header for the request and could returnstring|array|SimpleXMLElement|false
. In this PR I moved the logic from this method into the API classes. There we can better see the possible return types and I've updated the phpdoc return types accordingly.Thanks to new and improved tests I could also fix a bug in
Redmine\Api\Attachment::download()
returning false on error instead of the HTML 404 error page.This PR removes the
@internal
mark from the newHttpClient
andRequest
interfaces and deprecatesAbstractApi::get()
.I will do the same for
AbstractApi::post()
,AbstractApi::put()
andAbstractApi::delete()
in separate PRs, see #372.Requires #378.