Update bundled plugin-update-checker to v5.7 and remove broken setBranch() call

The bundled PUC was missing the setBranch() method on the main UpdateChecker
class (it's only on Vcs\PluginUpdateChecker via the VcsCheckerMethods trait).
When called with a non-VCS URL like the Gitea update URL, this caused a fatal
error at plugin activation.

Updating to PUC v5.7 (May 2026) which is the latest upstream release. The
setBranch() call is removed because PUC doesn't recognize Gitea as a VCS host;
the plugin falls back to PUC's plain JSON metadata mode, which is fine for a
plugin hosted on a self-managed repo.
This commit is contained in:
Keith Solomon
2026-08-11 16:08:20 -05:00
parent 93af230406
commit 2bbd2dc7c8
56 changed files with 722 additions and 2192 deletions
@@ -0,0 +1,25 @@
<?php
namespace YahnisElsts\PluginUpdateChecker\v5p7\DebugBar;
use YahnisElsts\PluginUpdateChecker\v5p7\Theme\UpdateChecker;
if ( !class_exists(ThemePanel::class, false) ):
class ThemePanel extends Panel {
/**
* @var UpdateChecker
*/
protected $updateChecker;
protected function displayConfigHeader() {
$this->row('Theme directory', esc_html($this->updateChecker->directoryName));
parent::displayConfigHeader();
}
protected function getUpdateFields() {
return array_merge(parent::getUpdateFields(), array('details_url'));
}
}
endif;