feat(sites): add per-server Sites CRUD#23
Merged
Merged
Conversation
Adds the Sites resource under the server chain ($forge->server($id)->sites() / ->site($siteId)) — the most actively managed Forge resource and the base for Deployments (#8). - Data\Site output DTO with nested Data\SiteRepository and Data\SiteMaintenanceMode value objects - Data\CreateSiteData (type required + common create surface), Data\UpdateSiteData (all optional), Data\ListSitesOptions - Enums\SiteType, Enums\WwwRedirectType (input), Enums\SiteStatus (output) - Requests: GetSites, GetSite, CreateSite (POST), UpdateSite (PUT), DeleteSite - Resources\SitesResource (all/iterate/create) and Resources\SiteResource (get/update[void]/delete) Spec-vs-runtime findings (to append to docs/FINDINGS.md): - Individual-site GET lives at the server-less `/orgs/{org}/sites/{site}` path; `/servers/{server}/sites/{site}` only supports PUT/DELETE. - Create requires `domain_mode` (spec marks optional) and, for on-forge mode, a single dotless subdomain `name`. - Freshly-created sites return `aliases`, `deployment_status`, and `maintenance_mode.enabled` as null despite the spec marking them required — DTO loosened accordingly. - PUT update returns 202 with empty body, so update() is void. - An on-forge site is briefly un-GET/PUT-able while provisioning; the lifecycle test waits on a live un-mocked connector before exercising the individual-site routes (skipped on replay). 344 tests / 670 assertions / 100% coverage. Closes #7. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 task
fbarrento
added a commit
that referenced
this pull request
May 24, 2026
…it (#28) Folds the divergences that had only lived in PR descriptions into docs/FINDINGS.md: ssh-key create 202-empty, the four Sites findings (server-less GET, runtime-required domain_mode, fresh-site nulls, PUT-empty), the deployments script/trigger notes, the two daemon findings (update needs config, install-state race), and the fixture-redaction hardening from the security audit (#27). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Adds the Sites resource under the server chain —
$forge->server($id)->sites()/->site($siteId). The most actively-managed Forge resource and the base for #8 Deployments.Data\Siteoutput DTO with nestedData\SiteRepository+Data\SiteMaintenanceModevalue objectsData\CreateSiteData(type required + common create surface),Data\UpdateSiteData(all optional),Data\ListSitesOptionsEnums\SiteType,Enums\WwwRedirectType(input) andEnums\SiteStatus(output)GetSites,GetSite,CreateSite(POST),UpdateSite(PUT),DeleteSiteResources\SitesResource(all/iterate/create) andResources\SiteResource(get / update[void] / delete)Spec-vs-runtime findings (for docs/FINDINGS.md once #20-derived doc lands)
/orgs/{org}/sites/{site}. The/servers/{server}/sites/{site}path only supports PUT/DELETE (GET there → 405).domain_mode(spec marks it optional); on-forge mode needs a single dotless subdomainname.aliases/deployment_status/maintenance_mode.enabledas null despite required-non-null in spec — DTO loosened.update()isvoid.Test plan
composer test— pint, rector, phpstan, 344 tests / 670 assertions, 100% coverage.deployment_urltoken, healthcheck URL).🤖 Generated with Claude Code