Skip to content
Corex

ReleaseStaging

Corex\Config\Releases\ReleaseStaging · class · Config layer

A package unpacked beside the site, and held to its own description (spec 107, plan D8: the unpack and verify steps; FR-013). Only the folders a release owns are unpacked, into staging/ in the installer’s own place. Nothing of the site is touched: a folder is moved into the site only after every one of them has been found to be what the package says it holds. A package also holds WordPress itself, which an installation does not replace and this does not unpack. A host cuts a request off after some seconds, and a release is thousands of files. So a request unpacks for a while and answers where it has got to, and the next goes on from there.

__construct(ReleaseStore $store, ReleaseContentHash $contents, float $seconds)

Section titled “__construct(ReleaseStore $store, ReleaseContentHash $contents, float $seconds)”

unpack(string $zipFile, ReleaseManifest $manifest, int $cursor): array

Section titled “unpack(string $zipFile, ReleaseManifest $manifest, int $cursor): array”

Unpack more of the package, from the entry given. At least one entry is dealt with, however little time there is, so every request gets somewhere. From the first entry, whatever an earlier attempt left is removed first.

verify(ReleaseManifest $manifest, string $releasePath): void

Section titled “verify(ReleaseManifest $manifest, string $releasePath): void”

Hold one unpacked folder to what the package says it holds.

Where a folder of the release is while it is staged.

Remove everything that is staged.

Remove everything that is staged by one rename, for a request that should not spend a release’s worth of deleting: what was staged is deleted when the screen next opens.