Rename getScriptExecution() to scriptExecution() and document API limits - #90
Merged
Conversation
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".
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.
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 whichServerinherits fromResource. Methods that actually call an endpoint are noun-only:logs(),monitoring(),phpVersions().This is not a breaking change: the method landed after the
2.1tag, so it has never been released. No deprecated alias needed.Test
testBuildsUrlCorrectly()is the only test inServerTestthat does not hit the live API, so the two new endpoints are asserted there:README
Documents two things from the API docs that were not mentioned:
$contentis capped at 7500 characters (a 422 →NotValidotherwise, with no obvious cause)$userdefaults toploiwhen omittedVerification
vendor/bin/phpstan analyse -c phpstan.neon→[OK] No errorsvendor/bin/phpcs --standard=PSR12 src→ byte-identical to themasterbaseline (130 pre-existing errors, none added)vendor/bin/phpunit --filter testBuildsUrlCorrectly→OK (1 test, 8 assertions)