Releases: aternosorg/php-hangar-api
v4.0.0
Changes:
- Changes return type for
APIKeysApi->getKeys()
from\Aternos\HangarApi\Model\ApiKey
to\Aternos\HangarApi\Model\ApiKey[]
- Removes parameter
platform_version
fromVersionsAPI->listVersions()
- Removes parameter
platformVersion
fromCompactProject->getVersions()
- Removes parameter
platformVersion
fromProject->getVersions()
- Removes member
platformVersion
fromVersionSearchOptions
- Adds property
description
toProjectCompact
- Adds model for Tag
- Changes type of property
tags
inProjectSettings
fromstring[]
to\Aternos\HangarApi\Model\Tag[]
v3.3.1
Fixes
- Prevent PHP Warning for array to string conversion when fetching project versions
v3.3.0
v3.2.0
- Add sort order to project search
v3.1.1
Fixes
- Add extends doc comment to ProjectMemberList
This fixes the annotated return type of all methods of the ProjectMemberList class.
v3.1.0
New Features
- Add method ResultList->getResultsFromFollowingPages to get the results from all pages
v3.0.0
Version 3.0.0 continues the transition from namespaces to unique slugs and also fixes the name of a parameter that was changed.
Breaking Changes
- Methods that previously accepted a ProjectNamespace now only accept the project slug.This includes:
- getProjectWatchers
- getProjectStarGazers
- getProjectMembers
- The following methods previously accepted a Project or ProjectNamespace and now accept a Project or slug:
- getProjectVersions
- getProjectVersion
- VersionSearchOptions->projectNamespace has also been replaced with the projectSlug
- The project search option 'order with relevance' was renamed to 'prioritize exact match'. Version 2.0.0 already changed the option passed to the hangar API and this change makes the name in our code base match the behaviour.
New Features
- Add shorthand getSlug() to Project and CompactProject
- Add setter for a custom HTTPClient
- Add constructor parameters for api key and user agent
v2.0.0
A few days ago Hangar released some API changes.
This release contains the new generated code and updated our client code.
Basically they removed the author / owner parameter from most api endpoints because the project name / slug is unique (now).
For detailed information see #1
Migration guide
Migration guide from 1.0.0 to 2.0.0
HangarAPIClient->getStaff()
method signature changed (added parameter $query
and added parameter $sort
)
from public function getStaff(?RequestPagination $pagination = null): StaffList
to public function getStaff(string $query = "", ?RequestPagination $pagination = null, ?string $sort = null): StaffList
- If you don't use the argument
$pagination
or pass it as a named argument, you must not change anything - Please update your function calls to include the argument
$query
if do not want to use the default value ("" = all) or if you use the argument$pagination
and do not pass it as a named argument
HangarAPIClient->getAuthors()
method signature changed (added parameter $query
and added parameter $sort
)
from public function getAuthors(?RequestPagination $pagination = null): AuthorList
to public function getAuthors(string $query = "", ?RequestPagination $pagination = null, ?string $sort = null): AuthorList
- If you don't use the argument
$pagination
or pass it as a named argument, you must not change anything - Please update your function calls to include the argument
$query
if do not want to use the default value ("" = all) or if you use the argument$pagination
and do not pass it as a named argument
HangarAPIClient->getProject()
method signature changed (removed parameter $author
)
from public function getProject(string $author, string $name): Project
to public function getProject(string $slug): Project
- Please remove the argument
$author
from your function calls
HangarAPIClient->getProjectMainPage()
method signature changed (removed parameter $author
)
from public function getProjectMainPage(string $author, string $slug): ProjectPage
to public function getProjectMainPage(string $slug): ProjectPage
- Please remove the argument
$author
from your function calls
HangarAPIClient->getProjectPage()
method signature changed (removed parameter $author
)
from public function getProjectPage(string $author, string $slug, string $path): ProjectPage
to public function getProjectPage(string $slug, string $path): ProjectPage
- Please remove the argument
$author
from your function calls
HangarAPIClient->editProjectMainPage()
method signature changed (removed parameter $author
)
from public function editProjectMainPage(string $author, string $slug, string $content): ProjectPage
to public function editProjectMainPage(string $slug, string $content): ProjectPage
- Please remove the argument
$author
from your function calls
HangarAPIClient->editProjectPage()
method signature changed (removed parameter $author
)
from public function editProjectPage(string $author, string $slug, string $path, string $content): ProjectPage
to public function editProjectPage(string $slug, string $path, string $content): ProjectPage
- Please remove the argument
$author
from your function calls
HangarAPIClient->hasPermissions()
method signature changed (removed parameter $owner
)
from public function hasPermissions(array $permissions, ?string $owner = null, ?string $project = null): bool
to public function hasPermissions(array $permissions, ?string $project = null): bool
- Please remove the argument
$owner
from your function calls
HangarAPIClient->hasPermission()
method signature changed (removed parameter $owner
)
from public function hasPermission(string $permission, ?string $owner = null, ?string $project = null): bool
to public function hasPermission(string $permission, ?string $project = null): bool
- Please remove the argument
$owner
from your function calls
HangarAPIClient->getDailyProjectStats()
method signature changed (removed parameter $owner
)
from public function getDailyProjectStats(string $owner, string $slug, DateTime $from, ?DateTime $to = null): array
to public function getDailyProjectStats(string $slug, DateTime $from, ?DateTime $to = null): array
- Please remove the argument
$owner
from your function calls
v1.0.0
remove version from composer.json