UpdateService
Corex\Update\UpdateService · class · Core layer
Wires Corex into WordPress’s plugin-update flow so a published newer version surfaces as an available update in wp-admin — like any plugin. It fetches an update manifest from the configured endpoint, asks the pure UpdateChecker if it is newer, and injects the update into the update transient (and the details popup). Fail-safe: a missing/unreachable/ malformed source is a silent no-op. WordPress’s own updater downloads + installs the package, replacing only the framework plugin’s files (spec 034).
Public API
Section titled “Public API”__construct(UpdateChecker $checker, string $pluginFile, string $slug, string $currentVersion, ConfigInterface $config)
Section titled “__construct(UpdateChecker $checker, string $pluginFile, string $slug, string $currentVersion, ConfigInterface $config)”register(): void
Section titled “register(): void”checkUpdates($transient)
Section titled “checkUpdates($transient)”toUpdateObject(array $update): object
Section titled “toUpdateObject(array $update): object”The WP plugin-update object for an available update (the shape WP expects in the transient’s response).
details($result, $action, $args)
Section titled “details($result, $action, $args)”fetchManifest(): array
Section titled “fetchManifest(): array”Fetch the update manifest from the configured endpoint. Fail-safe: empty endpoint, a transport error, or malformed JSON all yield an empty manifest (→ no update offered).