Download the PHP package mouf/utils.patcher without Composer

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

Latest Stable Version Latest Unstable Version License Scrutinizer Code Quality

Mouf's patching system

This package is a patch system designed for Mouf than enables developers to know what patch has been run and what needs to be run on its environment. If you are working with a team or with many environment, this is very useful to know which database patches have been applied or not in an environment.

Video tutorial

Installing the patch service

Installation is done via composer. Here is a typical composer.json file:

As you can see, we are installing two packages here.

Using the patch service (graphical user interface)

Once the patch service is installed, you will notice there is a new menu in Mouf UI.

Using the Utils > Patches management menu, you can access the patches list or create new database patches.

Let's have a quick look at the paches list.

In this list, you can view all the patches that have been defined. Using one big button, you can easily apply all the patches that needs to be applied. This is really the only button you should ever touch on that screen, unless you are playing with advanced features like database replication, etc...

If you need a more fine-tuned approach, you can apply each patch one by one. You can also skip the patch if you prefer to run it yourself or if you know it has already been applied. Finally, you will notice that some patches can be reverted.

Using the patch service (command line interface)

You can also apply patches using the Mouf console. This is especially useful for deployments in continuous integration environments or on a production server.

Creating/Editing a database patch

You have 2 options to edit your database patches.

Using SQL patches

You can create a new SQL database patch using the Utils > Patches management > Register a SQL patch menu.

As you can see, you need to provide a unique patch name. You can (and you should) add a comment that will help you and others remember what this patch is doing. Finally, you will add the SQL of the patch.

You can choose what to do when you save the patch. You have 3 options:

Advanced options

There are a number of advanced options. These will allow you to:

Using PHP migration classes

You can create a new PHP migration class using the Utils > Patches management > Register a SQL patch menu.

There are really 2 kinds of migration patches:

You should choose which kind of patch you are creating in the UI.

The UI will generate a PHP file for you containing your class.

You can then use the power of Doctrine DBAL to write your patch.

Class generated for altering a database model

Class generated for altering data

Patch type

Whether you create a SQL patch or a PHP migration class, you can select a patch "type".

By default, the package comes with 2 bundled types:

You can also edit thos patch types or add your own patch types by editing the patchService instance in Mouf.

You are a package developer? You want your own package to create/modify tables? See how you can use the patch system for that.
Want to learn more about the patch system? Want to learn how to create you own non db-related patches? Have a look at the advanced documentation.


All versions of utils.patcher with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
mouf/mouf-validators-interface Version ~2.0
mouf/utils.console Version ~1.0
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 mouf/utils.patcher contains the following files

Loading the files please wait ....