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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user