Download the PHP package avelpress/updater without Composer

On this page you can find all versions of the php package avelpress/updater. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package updater

AvelPress Updater

Offers new versions of a WordPress plugin on the WordPress update screen, for plugins that are distributed outside wordpress.org (sold or given away from your own store).

It used to live inside avelpress/avelpress (1.3.0 to 1.3.2). It is a separate package now, so plugins that do not need it do not ship it.

Never ship it in a wordpress.org build

wordpress.org delivers updates itself and its guidelines forbid a plugin from changing the update source. Code that hooks the update check gets a plugin rejected in review. Plugins distributed through wordpress.org must not require this package.

avel build (avelpress-cli 1.2.0 or later) enforces this: with 'build' => ['wordpress_org' => true] in avelpress.config.php, the build fails if avelpress/updater is among the installed dependencies, if the plugin still configures an updater, or if the installed avelpress/avelpress still bundles it (1.3.0 to 1.3.2). Older CLI versions, up to 1.1.5, ignore wordpress_org silently and check nothing.

Installation

The package has no dependency on avelpress/avelpress, and it works with or without it.

Require it in the same change that moves the plugin to avelpress/avelpress 2.0. AvelPress 1.3.0 to 1.3.2 still carries its own copy of these classes, so with both installed Composer reports an "Ambiguous class resolution" when it optimizes the autoloader and loads whichever copy it finds first; a fix made in this package can then be silently shadowed by the 1.3 copy. Treat core 1.3.x plus this package as a transitional state only.

Usage with AvelPress (2.0 or later)

Declare updater in AvelPress::init(), exactly as before the split:

An endpoint that only answers with a valid licence takes an auth callback. Its data is sent as a JSON body, and the request becomes a POST:

updater also accepts any object implementing AvelPress\Update\Contracts\UpdateProvider, for a source that is not a plain HTTP endpoint.

When the application boots, AvelPress hands the config to AvelPress\Update\UpdaterBootstrapper::boot(). It reads the version from the header of {plugin_root}/{id}.php, uses the plugin id as slug, and registers the hooks. If updater is configured but this package is not installed, AvelPress shows a notice to administrators instead of failing.

Usage without AvelPress

How it hooks into WordPress

PluginUpdater::register() adds two filters:

The endpoint answer is cached in a site transient named avelpress_update_<md5(slug)>: 6 hours on success, 15 minutes on failure. "Check again" on the updates screen (force-check) skips the cache.

Endpoint contract

Without auth, a GET with ?plugin_slug=<slug>. With auth, a POST whose JSON body is plugin_slug merged with the credentials. Anything other than a 200 with a JSON object counts as a failure (WP_Error code avelpress_update_failed, with the endpoint's message when there is one).

The keys read from the answer:

Key Use
new_version Required. Version offered.
package ZIP WordPress downloads. Must be reachable without credentials.
url / download_url Details link (falls back to the plugin URI header).
requires, tested, requires_php, last_updated Shown in the details modal.
sections Tabs of the details modal, e.g. changelog.
banners, banners_rtl, icons Images of the details modal and update row.

Prefixed builds

avel build prefixes this package along with the rest of the vendor folder, so two plugins shipping different versions of it do not collide. Keep references to it in the form \AvelPress\Update\... or use AvelPress\Update\...; so the prefixer finds them.

Tests

License

MIT


All versions of updater with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package avelpress/updater contains the following files

Loading the files please wait ...