Repository navigation
⚠️ !Breaking Change! Reorder constructor parameters, remove $userAgent - #36
Merged
Merged
Conversation
JulianVennen
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The constructor of
HangarAPIClientnow takes the API key first, followed by the configuration and the HTTP client. This matches the other API clients (for Modrinth and CurseForge):Breaking changes
$apiKey,$configuration,$httpClient. Calls that pass the configuration or the API key by position have to be updated. Calls with named arguments keep working, except foruserAgent.$userAgentparameter is removed. UsesetUserAgent()instead, or set the user agent on a configuration and pass it to the constructor.Tests and README
$userAgentparameter is replaced by a test that checks that the host and user agent of a configuration passed to the constructor are used.