afragen/git-updater-lite
Composer 安装命令:
composer require afragen/git-updater-lite
包简介
A simple class to integrate with Git Updater for standalone plugin/theme updates.
关键字:
README 文档
README
- Contributors: Andy Fragen
- Tags: plugin, theme, updater, git-updater
- Requires at least: 6.6
- Requires PHP: 7.4
- Donate link: https://thefragens.com/git-updater-donate
- License: MIT
A simple standalone library to enable automatic updates to your git hosted WordPress plugins or themes.
Description
This is version 3.x and contains a breaking changes.
This library was designed to be added to your git hosted plugin or theme to enable standalone updates.
You must have a publicly reachable site that will be used for dynamically retrieving the update API data.
- Git Updater is required on a site where all of the release versions of your plugins and themes are installed.
- All of your plugins/themes must be integrated with Git Updater.
- You must be using Git Updater v13.1.x or better.
Git Updater is capable of returning a REST endpoint containing the plugins_api() or themes_api() data for your plugin/theme. You will pass this endpoint during the integration.
The REST endpoint format is as follows.
- plugins -
https://my-site.com/wp-json/git-updater/v1/update-api/?slug=my-plugin - themes -
https://my-site.com/wp-json/git-updater/v1/update-api/?slug=my-theme
Version 3.0.0 works better with repositories requiring authentication headers using a 2-step process and not exposing the authentication header. It can also be set in Git Updater to use domain validation.
Installation
Add via composer. composer require afragen/git-updater-lite:^3
-
Add the
Update URI: <update server URI>header to your plugin or theme headers. Where<update server URI>is the domain to the update server, eghttps://git-updater.com. -
Add the following code to your plugin file or theme's functions.php file.
require_once __DIR__ . '/vendor/afragen/git-updater-lite/Lite.php'; ( new \Fragen\Git_Updater\Lite( __FILE__ ) )->run();
An example integrated plugin is here, https://github.com/afragen/test-plugin-gu-lite
<?php /** * Plugin Name: Test Plugin Git Updater Lite * Plugin URI: https://github.com/afragen/test-plugin-gu-lite/ * Description: This plugin is used for testing functionality of Github updating of plugins. * Version: 0.2.0 * Author: Andy Fragen * License: MIT * Requires WP: 6.6 * Requires PHP: 7.4 * Update URI: https://git-updater.com */ /** * Exit if called directly. */ if ( ! defined( 'WPINC' ) ) { die; } require_once __DIR__ . '/vendor/afragen/git-updater-lite/Lite.php'; ( new \Fragen\Git_Updater\Lite( __FILE__ ) )->run();
FWIW, I test by decreasing the version number locally to see an update.
afragen/git-updater-lite 适用场景与选型建议
afragen/git-updater-lite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.96k 次下载、GitHub Stars 达 20, 最近一次更新时间为 2024 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「wordpress」 「updater」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 afragen/git-updater-lite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 afragen/git-updater-lite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 afragen/git-updater-lite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Migration generator for Yii 2.
A module to backup and update SimpleSAMLphp installations
Simple ASCII output of array data
eZ Update offers composer package(s) updates - Use this feature to update your website to the latest available release via composer
Reusable GitHub updater helper for WordPress plugins, built on top of yahnis-elsts/plugin-update-checker
统计信息
- 总下载量: 1.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-26