Skip to content

Rename Version::getProject() to fetchProject(), Deprecate Version::getProject() - #24

Merged
pavog merged 1 commit into
mainfrom
version-fetch-project
Oct 16, 2026
Merged

pavog merged 1 commit into
mainfrom
version-fetch-project

Conversation

@pavog

@pavog pavog commented Oct 16, 2026

Copy link
Copy Markdown
Member

Version::getProject() sends a request to the SpigotMC API, but its name looks like a getter of the generated model. Methods that send a request are now prefixed with fetch, so it is clear when the client calls the API.

Changes

  • New Version::fetchProject(). It returns the same Project. The PHPDoc states that it sends a request on every call and that the result is not cached.
  • Version::getProject() is deprecated and calls fetchProject(). It will be removed in the next major version.
  • Tests and README use fetchProject(). A new test checks that the deprecated getProject() still fetches the project.

This is not a breaking change.

@pavog
pavog merged commit 882f2eb into main Oct 16, 2026
5 checks passed
@pavog
pavog deleted the version-fetch-project branch October 16, 2026 16:03
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.

1 participant