Could we help you? Please click the banners. We are young and desperately need the money
While I was working on internal WP plugin, I had to find a way to automatically check and update that plugin. Therefore, I have created a PHP class PluginUpdater which would make it easy for the whole team to implement on multiple plugins. PluginUpdater has GPL-2.0 licence.
The package is no longer maintained and its source code is no longer publicly available, so it can't be newly installed. Its documentation can still be found on Packagist. It was included with Composer using:
composer require lexo/plugin-updater
Keep in mind that PluginUpdater requires PHP >=7.4.1 and it's tested up to PHP 8.1.9
Release tags are created with Semantic versioning in mind. Commit messages were following convention of Conventional Commits.
(new PluginUpdater())
->setBasename(BASENAME)
->setSlug(PLUGIN_SLUG)
->setVersion(VERSION)
->setRemotePath('https://website.tld/path/info.json')
->setCacheKey(CACHE_KEY)
->setCacheExpiration(12 * HOUR_IN_SECONDS)
->setCache(true)
->run();
For more details you can check out the Packagist page.