PHPackages                             jorisros/data-compare - 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. jorisros/data-compare

ActiveLibrary

jorisros/data-compare
=====================

Component that is able to compare big data sets

v1.0.4(6y ago)0434GPL-3.0-onlyPHP

Since Sep 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jorisros/data-compare)[ Packagist](https://packagist.org/packages/jorisros/data-compare)[ RSS](/packages/jorisros-data-compare/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (0)

[![Build Status](https://camo.githubusercontent.com/10e707ed16384fcdf4db9025685d54dad2292f466a89de894e1dce07261a26ff/68747470733a2f2f7472617669732d63692e6f72672f6a6f726973726f732f646174612d636f6d706172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jorisros/data-compare)[![Maintainability](https://camo.githubusercontent.com/e27fe9a9a86dfd315afaefd29495de140953e0b8ad8b3f10f12b97745ededf26/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35396437343036333337653361363364366563362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/jorisros/data-compare/maintainability)

DataCompare component
=====================

[](#datacompare-component)

This is a component that enables you detect if there are changes between two arrays.

Requiments
==========

[](#requiments)

This component is compatible from php 7.0 &lt; 7.3.

Example
=======

[](#example)

```
$product = Product::getBySku($xmlProduct['sku']);

if (!$product) {
    $product = new Product();
}

$dataproviderA = new \DataCompare\SimpleProvider();
$dataproviderA->addString('sku', $product->getSku());
$dataproviderA->addString('title', $product->getTitle());
$dataproviderA->addString('price', $product->getPrice());

$dataproviderB = new \DataCompare\SimpleProvider();
$dataproviderB->addString('sku', $jsonImport->sku);
$dataproviderB->addString('title', $jsonImport->title);
$dataproviderB->addString('price', $jsonImport->price);

$compareComponent = new \DataCompare\DataCompare($dataproviderA, $dataproviderB);

if (!$compareComponent->isTheSame()){
    // If result is not equal update the product
    $product->save()
}
```

TODO
====

[](#todo)

- Check if stucture of the array the same are
- Gives back on which data set there is a problem

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~9 days

Total

5

Last Release

2402d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c02ea57a258994d3f586ba5c58bd3d66bac8567bd5501466bb75a0faad786aa9?d=identicon)[jorisros](/maintainers/jorisros)

---

Top Contributors

[![jorisros](https://avatars.githubusercontent.com/u/752283?v=4)](https://github.com/jorisros "jorisros (9 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jorisros-data-compare/health.svg)

```
[![Health](https://phpackages.com/badges/jorisros-data-compare/health.svg)](https://phpackages.com/packages/jorisros-data-compare)
```

PHPackages © 2026

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