PHPackages                             wabel/zoho-crm-copy-db - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wabel/zoho-crm-copy-db

ActiveLibrary[Database &amp; ORM](/categories/database)

wabel/zoho-crm-copy-db
======================

This package contains code to help you copy ZohoCRM records directly into your database.

v1.0.0(10y ago)311.6k6[2 issues](https://github.com/Wabel/zoho-crm-copy-db/issues)MITPHPPHP &gt;=5.6

Since Apr 28Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Wabel/zoho-crm-copy-db)[ Packagist](https://packagist.org/packages/wabel/zoho-crm-copy-db)[ RSS](/packages/wabel-zoho-crm-copy-db/feed)WikiDiscussions 3.1 Synced 4w ago

READMEChangelogDependencies (7)Versions (16)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/9ea647795d940065f59c58e5743230952412cbbddbb5a287eb34c7b9d02ae6bb/68747470733a2f2f706f7365722e707567782e6f72672f776162656c2f7a6f686f2d63726d2d636f70792d64622f762f737461626c65)](https://packagist.org/packages/wabel/zoho-crm-copy-db)[![Latest Unstable Version](https://camo.githubusercontent.com/1d29325ca005df7a8f465c2464ec093725bc0b78e32b699b024eb07eaf71f8ac/68747470733a2f2f706f7365722e707567782e6f72672f776162656c2f7a6f686f2d63726d2d636f70792d64622f762f756e737461626c65)](https://packagist.org/packages/wabel/zoho-crm-copy-db)[![License](https://camo.githubusercontent.com/2e1788a4d6fefb409066c7455ffbe653a31d34993b203a16c3663313e4f834b1/68747470733a2f2f706f7365722e707567782e6f72672f776162656c2f7a6f686f2d63726d2d636f70792d64622f6c6963656e7365)](https://packagist.org/packages/wabel/zoho-crm-copy-db)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4fe5661bb5ffcb8bf0def42822bec0f2cdaef391512746f783ee096c163c7b18/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f576162656c2f7a6f686f2d63726d2d636f70792d64622f6261646765732f7175616c6974792d73636f72652e706e673f623d322e30)](https://scrutinizer-ci.com/g/Wabel/zoho-crm-copy-db/?branch=2.0)[![Build Status](https://camo.githubusercontent.com/3277beefc8c39619fa306d351e5515cb862b7406a7bafc8627b3fc1b56c6c552/68747470733a2f2f7472617669732d63692e6f72672f576162656c2f7a6f686f2d63726d2d636f70792d64622e7376673f6272616e63683d322e30)](https://travis-ci.org/Wabel/zoho-crm-copy-db)[![Coverage Status](https://camo.githubusercontent.com/6c5ac8786aea3bbf4dd00cf0fb7749383f4ad6a5d6cd7efd3845c4300c35afc0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f576162656c2f7a6f686f2d63726d2d636f70792d64622f62616467652e7376673f6272616e63683d322e30)](https://coveralls.io/r/Wabel/zoho-crm-copy-db?branch=2.0)

Wabel's Zoho-CRM Database copier
================================

[](#wabels-zoho-crm-database-copier)

What is this?
-------------

[](#what-is-this)

This project is a set of tools to help you copy your Zoho CRM records directly into your database. The tool will create new tables in your database matching Zoho records. If you are looking to synchronize data from ZohoCRM with your own tables, you should rather have a look at [ZohoCRM Sync](https://github.com/Wabel/zoho-crm-sync). It is built on top of the [ZohoCRM ORM](https://github.com/Wabel/zoho-crm-orm). Before reading further you should get used to working with [ZohoCRM ORM](https://github.com/Wabel/zoho-crm-orm), so if you do not know this library, [STOP READING NOW and follow this link](https://github.com/Wabel/zoho-crm-orm).

How does it work?
-----------------

[](#how-does-it-work)

This projects provides a `ZohoDatabaseCopier` class, with a simple `fetchFromZoho` method. This method takes a `ZohoDao` in argument. `ZohoDaos` can be created using the [ZohoCRM ORM](https://github.com/Wabel/zoho-crm-orm). It also provides a `ZohoDatabasePusher` class with a `pushToZoho` method to push data to Zoho CRM.

---

#### ZohoDatabaseCopier for Module

[](#zohodatabasecopier-for-module)

Usage:

```
// $connection is a Doctrine DBAL connection to your database.
$databaseCopier = new ZohoDatabaseCopier($connection);

// $contactZohoDao is the Zoho Dao to the module you want to copy.
$databaseCopier->fetchFromZoho($contactZohoDao);
```

The copy command will create a 'zoho\_Contacts' table in your database and copy all data from Zoho. Table names are prefixed by 'zoho\_'.

You can change the prefix using the second (optional) argument of the constructor:

```
// Generated database table will be prefixed with "my_prefix_"
$databaseCopier = new ZohoDatabaseCopier($connection, "my_prefix_");
```

By default, copy is performed incrementally. If you have touched some of the data in your database and want to copy again everything, you can use the second parameter of the `copy` method:

```
// Pass false as second parameter to force copying everything rather than doing an incremental copy.
$databaseCopier->fetchFromZoho($contactZohoDao, false);
```

---

#### ZohoDatabaseCopier for Users

[](#zohodatabasecopier-for-users)

With the same `$databaseCopier` you can fetch the users from zoho. Usage:

```
// $connection is a Doctrine DBAL connection to your database.
$databaseCopier = new ZohoDatabaseCopier($connection);

```php
// $userResponse is the Zoho Client Response from zoho-crm-orm package.
$databaseCopier->fetchUserFromZoho($userResponse);
```

---

#### ZohoDatabasePusher

[](#zohodatabasepusher)

Usage:

```
// $connection is a Doctrine DBAL connection to your database.
$databaseSync = new ZohoDatabasePusher($connection);

// $contactZohoDao is the Zoho Dao to the module you want to push.
$databaseSync->pushToZoho($contactZohoDao);
```

Requirements
------------

[](#requirements)

This project requires MySQL 5.7+ to work.

Symfony command
---------------

[](#symfony-command)

The project also comes with a Symfony Command that you can use to easily copy tables.

The command's constructor takes in parameter a `ZohoDatabaseCopier` instance, a`ZohoDatabasePusher` instance and a `ZohoClient`. This command regenerates automatically the Daos in order to pass them in `ZohoDatabaseCopier` instance, a`ZohoDatabasePusher`.

Usage:

```
# Command to synchronize data (both ways)
$ console zoho:sync
# Command to only fetch data from Zoho
$ console zoho:sync --fetch-only
# Command to only push data to Zoho
$ console zoho:sync --push-only
```

Listeners
---------

[](#listeners)

For each `ZohoDatabaseCopier`, you can register one or many listeners. These listeners should implement the [`ZohoChangeListener`](blob/2.0/src/ZohoChangeListener.php) interface.

You register those listener by passing an array of listeners to the 3rd parameter of the constructor:

```
$listener = new MyListener();
$databaseCopier = new ZohoDatabaseCopier($connection, "my_prefix_", [ $listener ]);
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Recently: every ~187 days

Total

15

Last Release

1554d ago

Major Versions

1.1.x-dev → 3.0.x-dev2019-03-17

2.0.x-dev → 3.1.x-dev2019-07-29

PHP version history (2 changes)1.0.x-devPHP &gt;=5.6

3.0.x-devPHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5702056?v=4)[WizMik](/maintainers/WizMik)[@WizMik](https://github.com/WizMik)

![](https://www.gravatar.com/avatar/73dd84a4da5bc50dbe771f9ec430f3b99fbb970469e29936baa1b6186b6c58d8?d=identicon)[max.prudhomme](/maintainers/max.prudhomme)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (42 commits)")[![rbergDrox](https://avatars.githubusercontent.com/u/11984931?v=4)](https://github.com/rbergDrox "rbergDrox (40 commits)")[![Zheness](https://avatars.githubusercontent.com/u/5830103?v=4)](https://github.com/Zheness "Zheness (8 commits)")

---

Tags

ormcopyZohoZoho CRMZohoCRM

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wabel-zoho-crm-copy-db/health.svg)

```
[![Health](https://phpackages.com/badges/wabel-zoho-crm-copy-db/health.svg)](https://phpackages.com/packages/wabel-zoho-crm-copy-db)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k295.3M7.2k](/packages/doctrine-orm)[psx/sql

Generate type-safe PHP classes from your database

1774.5k5](/packages/psx-sql)[bartlett/php-compatinfo-db

Reference Database of all functions, constants, classes, interfaces on PHP standard distribution and about 110 extensions

1184.5k2](/packages/bartlett-php-compatinfo-db)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

249.4k](/packages/perplorm-perpl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
