Download the PHP package placebook/framework-selfupdate without Composer

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

ReadMe

The package is intended for semi-automatic updating of the database structure for the project core or third-party packages.

This package is part of the Placebook\Framework, but it can be used for any of your own projects. Also, it can be used not only for sql migrations, but also for any other reversible migrations.

How it works for the kernel

The project contains a folder for this package. for example, /install The path to this folder was passed to the package:

This directory contains the versions.json file and custom_versions.json with the following content:

Here is the version description. By default, class names are in namespace Placebook\Framework\Core\Install\, but another namespace can be specified. Kernel versions will always increase only the first version number and be in versions.json. Then a specific site can take the current version of the kernel, eg, 3.0.0, and increase the versions as you like, but without increasing the major part of the version (3). And store your versions in a file custom_versions.json. The package will merge both files and will be able to upgrade from scratch to the maximum kernel version, and then to the maximum version of a specific project. At the same time, a specific project that is already working and has its own migrations will be able to update its kernel version, and with it it will be updated and versions.json. For example, version 4.0.0 will appear there. Then the package will update the kernel, and then the project will have to assign versions >4.0.0 to its migrations Placebook\Framework core will not save its versions to file custom_versions.json, he is only yours This way, the package will work well and automatically with both kernel and project migrations.

Update process

The specified folder contains the file db_version.lock It stores the current version of the kernel. If there is no file, version is interpreted as 0

In the same folder there is a file updating.lock. If it exists, then the update is in progress, then the package will not start the update in another thread. Thus, if the migration goes on for a long time, then only the first request (after uploading new files) will start the migration. And the rest of the incoming requests will be processed on the base structure that is. The package reads all available versions and arranges them in ascending order. From one version to another, you need to go through all the intermediate ones. If the update is interrupted, the updating.lock file will remain, and the update will not start again until you sort out the situation manually.

For sites

Kernel update:

Adding migration

Migration class example

For packages

Only one version file is needed, custom_versions.json is not needed. It is recommended to have this structure:

Since there are modules on the site, you can move the work with SelfUpdate into a separate file that will be connected for all requests. Suggested content:

Installed versions of modules will be stored along the path install/modules//.version.lock If a module has migrations to the database and is available for installation through composer, then when you add it as a dependency to the project, it will be enough to add it to the array with modules once, and then you can update its versions through composer, and changes in the database structure will occur automatically


All versions of framework-selfupdate with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
ext-json 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 placebook/framework-selfupdate contains the following files

Loading the files please wait ....