feat(updates): wire PUC v5 registration into Plugin::boot()

register_update_checker() guards on is_file + class_exists so the plugin
degrades cleanly on installs that ship without the vendored lib (no update
notices, but plugin core remains functional).
This commit is contained in:
Vladimir Bryzgalov
2026-04-21 21:08:34 +05:00
parent e4c31e3c40
commit 5b8eeffecb
2 changed files with 31 additions and 0 deletions
+11
View File
@@ -64,4 +64,15 @@ final class UpdateCheckerIntegrationTest extends Cf7stgTestCase
"download_url must contain expected asset name $expectedAssetName"
);
}
public function test_plugin_class_has_register_update_checker_method(): void
{
self::assertTrue(
method_exists('\\Cf7stg\\Plugin', 'register_update_checker'),
'Plugin class must expose register_update_checker()'
);
$ref = new \ReflectionMethod('\\Cf7stg\\Plugin', 'register_update_checker');
self::assertTrue($ref->isStatic(), 'register_update_checker must be static');
self::assertTrue($ref->isPrivate(), 'register_update_checker must be private');
}
}