* Fix WHM activation failing when package already exists (#4560)
- Request listpkgs with want=all and parse both legacy package and modern data.pkg shapes
- On addpkg already-exists, sync via editpkg and continue; only block activation on other errors
- Include WHM reason in Server_Exception and fix placeholder keys
* Add WHM API terms to spellcheck dictionary
* Address review: use typed exception for WHM already-exists, keep reasons out of API errors
- Add Server_PackageExistsException; request() now throws generic messages and translates already-exists at the WHM boundary
- checkPackageExists() catches the typed exception instead of matching getMessage()
* Fix Rector findings: remove unused catch variable and setAccessible call
* Handle modern WHM metadata.result failures in Whm::request
---------
Co-authored-by: opencode <opencode@localhost>
- Servicedomain order validation accepts the product context like
its sibling service modules, fixing a TypeError when ordering
domains through the cart. Fixes FOSSBILLING-Q0R.
- cPanel account sync casts the suspended flag to bool, fixing a
TypeError when the API reports it as an integer.
Fixes FOSSBILLING-N3T.
* Fix WHM reseller accounts always getting an empty ACL list
Server_Manager_Whm::createAccount() called $package->getAcllist(),
but Server_Package has never had that method. Its __call() silently
swallows calls to undefined methods and returns '', so every reseller
account created via WHM had setacls called with an empty acllist -
wiping out the initial privileges WHM had just granted via
setupreseller.
Wire the ACL list through the existing custom-value mechanism instead
(same pattern already used for cgi, cpmod, maxlst, hasshell), and skip
the setacls call entirely when the hosting plan defines no 'acl'
custom value, so the reseller keeps WHM's default privileges instead
of having them stripped.
Fixes#4173
* Whitelist WHM API action names for cspell
src/library/Server/Manager/** is excluded from spellcheck entirely, so
Whm.php's own use of these WHM API1 action/field names never tripped
the checker. tests/Unit/Server/Manager/WhmTest.php isn't under that
exclusion, so add the same words DirectAdmin's custom-value keys
already use this pattern for (listpkgs, addpkg, createacct,
setupreseller, setacls, acllist) to cspell.json's ignoreWords.