Migrator is a data transfer PHP application, based on ddeboer/data-import
You can install Migrator with composer by adding this configuration to your composer.json
{
"repositories": [
{
"url": "https://github.com/AgenceStratis/migrator.git",
"type": "git"
}
],
"require": {
"AgenceStratis/migrator": "dev-master"
}
}
Then you can download it with composer install
and use it in your project
use Stratis\Component\Migrator\Migrator;
$migrator = new Migrator('config.yml');
$migrator->process();
It's possible to create an application with PHP Box
Just clone this repo and run box.phar build
After migrator.phar
is built, you can now use it with YAML files as parameter
Note: All the files will be merged in one configuration
Configuration files use YAML language
It must include a source and a destination
source:
type: db
dbname: app
username: root
table: users
dest:
type: csv
filename: users.csv