-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enableReleaseAssets() no longer the supported method #533
Comments
There is no If you want to be explicit about calling |
My aplogies I did mean $myUpdateChecker = PucFactory::buildUpdateChecker('@plugin.github_repo@/releases/latest/download/info.json', __FILE__, '/@plugin.slug@');
$myUpdateChecker->getVcsApi()->enableReleaseAssets(); Above is how we used to enable a release strategy prior to v5 using Github. |
Also please review |
As I mentioned, if you want to be explicit about it, you could construct an API instance directly. For example: $githubApiInstance = new \YahnisElsts\PluginUpdateChecker\v5p1\Vcs\GitHubApi(
'https://github.com/username/repository',
'access-token-here'
);
$githubApiInstance->enableReleaseAssets();
$updateChecker = new \YahnisElsts\PluginUpdateChecker\v5p1\Vcs\PluginUpdateChecker(
$githubApiInstance,
__FILE__,
'plugin-slug-here'
); What should I review about that screenshot? That code will still work as long as you're using a GitHub repository. |
It works fine, the way I use it (for my plugin):
|
In the README.md the above code is still the recommended way to enable github release. However as you pointed out it no longer exists in the VCS Api and while I know if the plugin coder is sure he is using github he can still call it. IDE's hate it and its poor coding practice as it requires a virtually unchecked cast
Should the readme say
The text was updated successfully, but these errors were encountered: