Download the PHP package cfwme/selfupdate without Composer

On this page you can find all versions of the php package cfwme/selfupdate. 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 selfupdate

Project Self Update Extension for Yii 2

This extension allows automatic project updating in case its source code is maintained via version control system, such as GIT or Mercurial. Such update includes following steps:

Note: this solution is very basic and may not suite for the complex project update workflow. You may consider usage of more sophisticated tools like Phing. However, this extension may be used as a part of such solution.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Build Status

Requirements

This extension requires Linux OS.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json.

Usage

This extension provides special console controller [[yii2tech\selfupdate\SelfUpdateController]], which allows automatic updating of the project, if its source code is maintained via version control system. In order to enable this controller in your project, you should add it to your console application controllerMap at configuration file:

Now you should able to use 'self-update' command via console:

Project preparation

In order to use 'self-update' command, you should perform several preparations in your project, allowing certain shell commands to be executed in non-interactive (without user prompt) mode.

First of all, you should clone (checkout) your project from version control system and switch project working copy to the branch, which should be used at this particular server. Using GIT this actions can be performed via following commands:

Attention: you need to configure your VCS (or at least your project working copy) in the way interacting with remote repository does NOT require user prompt, like input of username or password! This can be achieved using authentication keys or 'remember password' feature.

Then you should make project operational performing all necessary actions for its initial deployment, like running 'composer install', creating necessary directories and so on.

Using self-update command

Once project is setup you need to create a configuration for its updating. This can be done using 'self-update/config' command:

This will generate configuration file, which should be manually adjusted depending on the particular project structure and server environment. For the common project such configuration file may look like following:

Please refer to [[\yii2tech\selfupdate\SelfUpdateController]] for particular option information.

Once you have made all necessary adjustments at configuration file, you can run 'self-update/perform' command with it:

You may setup default configuration file name inside the controllerMap specification via [[yii2tech\selfupdate\SelfUpdateController::configFile]]:

Then invocation of the self-update command will be much more clear:

Note: it is not necessary to create a separated configuration file: you can configure all necessary fields of [[yii2tech\selfupdate\SelfUpdateController]] inside controllerMap specification, but such approach is not recommended.

Self Update Workflow

While running, [[yii2tech\selfupdate\SelfUpdateController]] performs following steps:

At the first stage there is a check for any changes in the remote repository. If there is no changes in remote repository for the current project VCS working copy branch, no further actions will be performed!

If remote changes detected, the symbolic links pointing to the project '@web' directory will be switched to another directory, which should contain a 'stub' - some static HTML page, which says something like 'Application is under the maintenance, please check again later'. Although, usage of such stub it is up to you, it is recommended, because actual project update may take significant time before being complete. Project web directory will be linked back instead of stub, only after all update actions are performed.

During update itself VCS remote changes are applied, vendor directory is updated via Composer, specified temporary directories will be cleared and cache flushed.

Note: in order for Composer be able to apply necessary changes, the 'composer.lock' file should be tracked by version control system!


All versions of selfupdate with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
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 cfwme/selfupdate contains the following files

Loading the files please wait ....