* Plesk module creates the account, the subscription but the plan i...
Server_Manager_Plesk::createSubscriptionProps() built the webspace add/set request from custom hosting/limits/permissions values but never told Plesk which service plan to assign, so accounts were provisioned outside of any named plan; the fix adds the FOSSBilling hosting plan's name as the request's plan-name, matching how every other adapter (CWP, DirectAdmin, Hestia, WHM) already passes the package name through.
* 🐛 Don't send plan-name on Plesk subscription updates
CodeRabbit correctly flagged that Plesk's webspace/set schema has no plan-related
node at all (unlike add, which supports plan-name/plan-id/plan-guid/plan-external-id).
Sending plan-name through changeAccountPackage() -> webspace/set would have hit the
same XSD-sequence rejection as the original ordering bug, just for a different
reason -- an element Plesk doesn't recognize there at all.
plan-name now stays scoped to the add path only, matching the same conditional
pattern already used for htype. Changing an existing subscription's assigned plan
isn't supported by this code path; that would need a separate switch-subscription
operation (plan-guid/plan-external-id), which is out of scope for #2799.
---------
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
* 🐛 Fix Plesk subscription updates sending an invalid webspace 'set' request
Server_Manager_Plesk::createSubscriptionProps() built the same gen_setup/hosting/limits/permissions
payload for both the 'add' and 'set' webspace operations and placed it directly under the action
node. Plesk's API requires 'set' requests to wrap those settings in <filter> (which subscription to
update) and <values> nodes instead, and its update schema (SetGenSetupType) doesn't accept the
'htype' element that creation does. As written, every call to updateSubscription() (invoked from
changeAccountPackage() when a client's plan changes) sent Plesk a request it would reject.
This only affects the 'set' path; 'add' already matched Plesk's schema for subscription creation.
* 📝 Add 'htype' to cspell word list
src/library/Server/Manager/** is excluded from spellcheck, so this Plesk API field name was
never flagged there, but tests/Unit/Server/Manager/PleskTest.php isn't excluded and now
references it directly.
* 🐛 Filter Plesk webspace 'set' requests by domain, not owner-login
CodeRabbit correctly flagged that filtering by 'owner-login' matches every webspace
a customer owns; Plesk's 'set' operation applies the whole <values> block to every
webspace the filter matches. For a customer with more than one subscription, both
updateSubscription() (createSubscriptionProps 'set') and the pre-existing
changeAccountDomain() would silently overwrite limits/permissions/domain on
subscriptions other than the one being changed.
Filter by 'name' (the domain) instead, matching the single-subscription scoping
deleteSubscription() already uses. changeAccountDomain() now captures the current
domain before setDomain() overwrites it, since it needs the old value for the filter
and the new value for gen_setup.
Also added 'webspace'/'webspaces' to the cspell word list alongside 'htype', for the
same reason as the prior commit -- tests/Unit/Server/Manager isn't spellcheck-exempt.
* 🧹 Assert full gen_setup key order for the add action in PleskTest
Per CodeRabbit nitpick: the test checked htype's presence but not that it's
positioned between owner-login and ip_address as the docblock claims.
* 🧹 Trim redundant comment in createSubscriptionProps
The 'set' branch repeated the filter/values explanation already given in the
method's docblock; kept only the owner-login-vs-name rationale, which was the
actual new information.