Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
============================================
+ Coverage 99.72% 99.85% +0.13%
+ Complexity 627 609 -18
============================================
Files 129 129
Lines 1449 1411 -38
============================================
- Hits 1445 1409 -36
+ Misses 4 2 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
neto737
marked this pull request as draft
October 19, 2026 09:50
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.
Platform
#[\Override]to everyprocess()andgetTimeout()override, so a signature change in the parent can't silently turn an override into a separate method, and give the class constants types (public const int OK = 0,protected const string FORMAT_JSON = 'json').Commands
setLastResponse()+process()withprocess(ResponseInterface $response): mixed. A command currently stores the last response on itself, so it describes both the request and the result of its last run, and sending the same instance twice overwrites the first result (breaking for classes that implementICommandor overrideprocess()).Add\User,Lists\Users, …) kept since 2.1.0, along with their test intests/Command/DeprecatedNamesTest.php(breaking). Delete theAdd,Change,Delete,Lists,SuspendandUnsuspendfolders. InBackup, delete onlyUser.phpandUsers.php: the rest of that folder is the backup module's commands.ARG_*constants (breaking for custom commands that still use them).Command::getResponseCode()andCommand::defaultProcess()protected. Only subclasses use them, but as public methods they are part of the API (breaking for code that calls them from outside a command).ResponseCode::$messagesarray with aprivate const MESSAGES, and keepResponseCode::getMessage()as the way to read them. Any code can currently overwrite the messages at runtime, for every client in the process (breaking for code that reads or writes$messagesdirectly).Credentials and host
Credentialsconstructor and setters (breaking).Hostimmutable, likeCredentials: readonly properties, nosetHostname(),setPort()orsetCredentials()(orwith*()methods that return a copy), and removeClient::setHost(). A shared client can currently be switched to another server while in use. Rewrite the UPGRADING.md advice to pass newCredentialstoHost::setCredentials()(breaking).#[\SensitiveParameter]so they don't show up in stack traces and logged exceptions: the password, secret key and hash parameters ofCredentials,Client::simpleFactory(), the module methods that take a password, and the commandsAddUser,ChangeUserPassword,AddMailAccount,ChangeMailAccountPassword,AddDatabase,ChangeDatabasePassword,AddWebDomainFtpandChangeWebDomainFtpPassword. Add a__debugInfo()toCredentialsthat masks the secrets invar_dump().Modules
Client::loadModule()and create the module on eachgetModule*()call. Modules are thin wrappers with no state of their own, and the cache already caused the per-user bug fixed in 2.0.0 (breaking: repeated calls no longer return the same instance).IModulemarker interface (breaking for code that type-hints it).Exceptions
InvalidResponseExceptionfromProcessException. "This host isn't HestiaCP" is a setup error, not a failed command, and catchingProcessExceptionshouldn't catch it. Make it a subclass ofClientExceptionor a sibling ofProcessException(breaking).InvalidResponseExceptioninstead ofProcessException(code 0) when a list command's body isn't valid JSON, or isn't a JSON object or array. HestiaCP never sends that, so like a non-numeric exit code it means the host isn't HestiaCP. Update the table indocs/errors.md(breaking for code that catches it asProcessException).Exceptions\InvalidArgumentExceptionis a\InvalidArgumentExceptionandExceptions\RuntimeExceptiona\RuntimeException, with a shared marker interface replacing theExceptions\Exceptionbase class. Code that catches the standard types would then catch them too (breaking for code that catchesExceptions\Exception).Tests and tooling
src: move the tests intests/Command/AddTest.php,ChangeTest.php,DeleteTest.php,ListsTest.php,SuspendTest.phpandUnsuspendTest.php, still grouped by verb, intoUserTest,MailTest,WebTest,DatabaseTestand the other module test files.