Skip to content

⚠️ !Breaking Change! Rename ResultList to PaginatedList - #39

Merged
pavog merged 2 commits into
masterfrom
rename-to-paginated-list
Oct 19, 2026
Merged

pavog merged 2 commits into
masterfrom
rename-to-paginated-list

Conversation

@pavog

@pavog pavog commented Oct 19, 2026

Copy link
Copy Markdown
Member

The base class of all lists, Client\List\ResultList, is renamed to Client\List\PaginatedList. This is the name used by the other clients (for CurseForge, Modrinth and Spigot).

// before
use Aternos\HangarApi\Client\List\ResultList;

function printNames(ResultList $list): void {}

// after
use Aternos\HangarApi\Client\List\PaginatedList;

function printNames(PaginatedList $list): void {}

Not renamed

The lists that extend PaginatedList (e.g. ProjectList, UserList, ProjectVersionList) keep their names.

Breaking changes

  • ResultList is removed. Use PaginatedList in type hints, instanceof checks and classes that extend it. The old name is not kept as an alias, because this is part of a major release.
  • Code that only uses the lists returned by the client, e.g. foreach, getNextPage() or getResults(), is not affected.

Tests and README

  • ResultListTest is renamed to PaginatedListTest. The integration tests use PaginatedList.
  • The README section "Result Lists" is renamed to "Paginated Lists" and names the class.

@pavog
pavog merged commit dd966ba into master Oct 19, 2026
4 checks passed
@pavog
pavog deleted the rename-to-paginated-list branch October 19, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants