v0.1.5 - Harden update flow
Fixes fatal errors in the self-update flow that caused the previous v0.1.4 release to break theme/plugin update transients.
Highlights
- Drop strict
\stdClasstype hints from filter callbacks (pre_set_site_transient_update_*,themes_api,plugins_api); guard with runtime type checks. Non-stdClass values from core/other plugins no longer TypeError. Plugin::boot()andUpdateManager::register_hooks()are idempotent — safe under self-update reactivation, where WordPress re-includes the plugin bootstrap in the same request.- Defensive constant defines and
require_onceacross the bootstrap and autoloader. GitHubReleasesSourcecaches plain arrays instead ofUpdateResultinstances, so changes to the result class shape can no longer poison cached transients.Client::is_github_url()uses exact-host / proper-subdomain matching (was matchingevilgithub.com); addscodeload.github.comandobjects.githubusercontent.comfor redirect targets.DownloadProxystamps the proxied URL on each download and feeds it intoupgrader_source_selectionso the slug resolver can map the extracted folder back to product metadata reliably.- Cleans up temp file on every download error path; verifies the streamed download is non-empty.
- Adds missing
requires/requires_phpkeys to theme update entries. - Bumps
Requires PHPheader to 8.1 to match readonly/promoted-constructor usage.
Note
The v0.1.4 release ships pre-fix code and should not be installed.