Skip to content

Rename getScriptExecution() to scriptExecution() and document API limits - #90

Merged
Cannonb4ll merged 1 commit into
masterfrom
feat/script-execution-naming
Aug 24, 2026
Merged

Rename getScriptExecution() to scriptExecution() and document API limits#90
Cannonb4ll merged 1 commit into
masterfrom
feat/script-execution-naming

Conversation

@Cannonb4ll

Copy link
Copy Markdown
Member

Follow-up to #89.

Rename

Server::getScriptExecution()Server::scriptExecution().

In this SDK the get* prefix is reserved for accessors — getId(), getPloi(), getServer(), getEndpoint() — all of which Server inherits from Resource. Methods that actually call an endpoint are noun-only: logs(), monitoring(), phpVersions().

This is not a breaking change: the method landed after the 2.1 tag, so it has never been released. No deprecated alias needed.

Test

testBuildsUrlCorrectly() is the only test in ServerTest that does not hit the live API, so the two new endpoints are asserted there:

servers/1/scripts/run
servers/1/scripts/run/{uuid}

README

Documents two things from the API docs that were not mentioned:

  • $content is capped at 7500 characters (a 422 → NotValid otherwise, with no obvious cause)
  • $user defaults to ploi when omitted

Verification

  • vendor/bin/phpstan analyse -c phpstan.neon[OK] No errors
  • vendor/bin/phpcs --standard=PSR12 src → byte-identical to the master baseline (130 pre-existing errors, none added)
  • vendor/bin/phpunit --filter testBuildsUrlCorrectlyOK (1 test, 8 assertions)

The get* prefix is reserved for accessors on Resource (getId, getPloi,
getServer, getEndpoint), which Server inherits. Endpoint-calling methods
are noun-only: logs(), monitoring(), phpVersions(). The method was added
in #89 after the 2.1 tag, so it is unreleased and can be renamed without
a deprecated alias.

Also asserts the new endpoints build correctly in testBuildsUrlCorrectly()
(the only test that does not hit the live API) and documents that $content
is capped at 7500 characters and $user defaults to "ploi".
@Cannonb4ll
Cannonb4ll merged commit d25bdb1 into master Aug 24, 2026
14 checks passed
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