Download the PHP package divineomega/uxdm without Composer

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

🔀 Universal Extensible Data Migrator (UXDM)

UXDM helps developers migrate data from one system or format to another.

Installation

UXDM can be easily installed using Composer. Just run the following command from the root of your project.

If you have never used the Composer dependency manager before, head to the Composer website for more information on how to get started.

Quick Start

  1. Create a new PHP file to contain your UXDM migration code. In this example, we'll call it user-csv-import.php. Remember to add require 'vendor/autoload.php' and relevant use statements, if necessary.

  2. Create your source and destination objects. This example uses a CSV source and PDO (database) destination.

  3. Create and configure a new UXDM migrator object.

  4. Run your newly created migration. In this example, we can just run php user-csv-import.php from the command line and will get a nice progress bar.

See the sections below for more information on the available source and destination objects, and more advanced usage examples.

Migrations

Each UXDM migration requires a source object and at least one destination object. These determine where and how data is read and written. The UXDM package works with a variety of source and destination objects, including the following.

Some of these are built-in to the core UXDM package, while others are available as separate packages.

Source and destination objects can be used in any combination. Data can be migrated from a CSV and inserted into a database, just as easily as data can be migrated from a database to a CSV.

You can also use similar source and destination objects in the same migration. For example, a common use of UXDM is to use a PDO source and PDO destination to transfer data from one database to another.

Please see the Sources & Destinations page for more sources and destinations, and detailed documentation on their usage.

Examples

Database to database migration

An example of a basic database to database UXDM migration is shown below.

This migration will move the id, email and name fields from the the users table in the old-test database, to the new_users table in the new-test database, replacing any existing records with the same id (the key field).

Source data validation

You can use UXDM to validate the source data. If validation fails part way through a migration, the migration will halt and a ValidationException will be thrown. However, if ->validateBeforeMigrating() is called, all data rows will be preemptively validated before the migration begins.

The code below shows how to validate various fields.

This migration will validate the source data matches the defined validation rules.

UXDM uses the Omega Validator package. See its documentation for all available validation rules.

Mapping field names from source to destination

This examples shows how UXDM can map field names from source to destination.

This migration will move data from the source name field into the destination full_name field, while still moving the id and email fields normally.

Transforming data rows during migration

Sometimes the data you want to move from source to destination needs transforming. This can be changing existing items of data, adding new data items, or removing items you do not need.

UXDM allows you to create one or more transformer objects, and add them to the migration. See the following examples of how to use transformers to manipulate your data.

Changing existing data items

This example shows how you can transform existing data items during migration.

This migration will ensure that all names fields have consistent case.

Adding data items

This example shows how you can add new data items while the migration is taking place.

This migration will add a random number into a field called random_number for each row of data. This will then be migrated to the destination database along with the other fields.

Removing data items

This example demonstrates how data items can be removed from a data row. You may wish to do this if you want to use its value, but not actually migrate it to the destination.

This migration gets the data from the email field in the source, creates a new email_hash data item which contains an md5 of the email address, and then removes the original email data item. This new email_hash will then be migrated to the destination database along with the other fields, excluding the removed email field.


All versions of uxdm with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-pdo Version *
ext-dom Version *
ext-json Version *
psr/cache Version ^1.0
divineomega/array_undot Version ^4.1.0
divineomega/php-cli-progress-bar Version ^2.0
divineomega/omega-validator Version ^1.1
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 divineomega/uxdm contains the following files

Loading the files please wait ....