Download the PHP package aristath/github-theme-updater without Composer

On this page you can find all versions of the php package aristath/github-theme-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 github-theme-updater

github-theme-updater

This is a simple class that lets you use github releases in your repository to handle your theme updates. A more robust solution would be to use the github-updater plugin, but I simply refuse to include a 540kb library in my theme when I can accomplish what I need in less than 200 lines of code.
Is it perfect? No. Does it get the job done? Yes.

Implementing in the theme:

  1. Download the php file from this repo and include it in your theme, or require it using composer:

  2. Change the namespace on the top of the file to match the one you use in your theme (you are using namespaces, right?).
  3. Include the updater class in your functions.php file:

  4. At the bottom of the Updater.php file init the updater:

Releasing an update on Github

When you want to release an update you can simply go to your repository > Releases and create a new release.

Advice

Why was this created?

This project was created out of necessity for a theme submitted on wordpress.org. The theme-review process on wordpress.org takes a long time...

Overall a theme review can easily take more than 6 months.

In the meantime, life goes on. If your business depends on your themes, then you may want to implement an alternative method to provide updates for your theme so people can start using it and you can start growing.

Releasing your theme on w.org

Remember to remove the script when uploading an update on w.org. When your theme goes live you can remove it from the repository as well, this is only meant as a stepping stone.

Until your theme goes live you can ignore the class inclusion if you did it using get_template_part as in the example above. If the file doesn't exist nothing bad will happen.

Personally I prefer using a .gitattributes file to exclude the development files like .sass, .map, .editorconfig etc. If you use such a file on your project, you can just add Updater.php export-ignore in there and it won't be included in your theme export when you get your build ready for w.org

That's all. I hope you enjoy using this and it makes your life somewhat easier.


All versions of github-theme-updater with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 aristath/github-theme-updater contains the following files

Loading the files please wait ....