PHPackages                             fidilly/gendiff - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. fidilly/gendiff

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

fidilly/gendiff
===============

This library calculates and shows the difference between json or yaml file formats.

3.0.3(6y ago)017MITPHPCI failing

Since Jun 25Pushed 6y agoCompare

[ Source](https://github.com/fidilly/php-project-lvl2)[ Packagist](https://packagist.org/packages/fidilly/gendiff)[ RSS](/packages/fidilly-gendiff/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (5)Versions (18)Used By (0)

gendiff
=======

[](#gendiff)

[![Maintainability](https://camo.githubusercontent.com/e92f644ebb9ebb767e0e7134c757ddd370896f67b4b259321593e500bd9da91b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30326136643931633962333136393336653565662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/fidilly/php-project-lvl2/maintainability) [![Test Coverage](https://camo.githubusercontent.com/40071c8598e9f948573164054055da4d974e89ff0676bb2e3c8a86a54a6b92dd/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30326136643931633962333136393336653565662f746573745f636f766572616765)](https://codeclimate.com/github/fidilly/php-project-lvl2/test_coverage) [![Build Status](https://camo.githubusercontent.com/287c04366adecd52183a716f97d19ed98862add710624f1c6aa734e6260462d8/68747470733a2f2f7472617669732d63692e6f72672f666964696c6c792f7068702d70726f6a6563742d6c766c322e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fidilly/php-project-lvl2)

Gendiff is a library for comparing json or yaml file formats. This library calculates and shows the difference between files.

Installation
------------

[](#installation)

Gendiff can be installed globally with ***Composer*** or included in a project or library.

#### Global installation:

[](#global-installation)

```
composer global require fidilly/gendiff

```

**example:**

[![asciicast](https://camo.githubusercontent.com/402b660503094652973be72db09493a06c1849c007f2f09ad2310f44a8d73f1e/68747470733a2f2f61736369696e656d612e6f72672f612f3235333530372e737667)](https://asciinema.org/a/253507)

#### Include:

[](#include)

```
composer require fidilly/gendiff

```

```
use function Differ\Gendiff\gendiff;

gendiff($pathToFile1, $pathToFile2, $format);

```

Usage via terminal
------------------

[](#usage-via-terminal)

**Help call examples:**

```
gendiff -h

```

```
gendiff --help

```

Gendiff supports multiple output formats.

**examples:**

```
gendiff   ###default 'pretty' format
gendiff --format pretty
gendiff --format plain
gendiff --format json

```

Usage examples
--------------

[](#usage-examples)

[![asciicast](https://camo.githubusercontent.com/819c17ca70d2a3043ca42e5532fd7a34b2a9dca2be3b32a95a4dd38007cc44ca/68747470733a2f2f61736369696e656d612e6f72672f612f3235343037372e737667)](https://asciinema.org/a/254077)

[![asciicast](https://camo.githubusercontent.com/6a64efcd205ce173fad3ddbec5e07091b99ec06b7ad92418df357f6dbe2e2824/68747470733a2f2f61736369696e656d612e6f72672f612f3235343037362e737667)](https://asciinema.org/a/254076)

[![asciicast](https://camo.githubusercontent.com/54ef8702d5ac3bf5db3ba9903098fcd22757a0de011b27b6f02a3182fd5d6384/68747470733a2f2f61736369696e656d612e6f72672f612f3235343238392e737667)](https://asciinema.org/a/254289)

[![asciicast](https://camo.githubusercontent.com/28907efb0b18518168e6d3ee3155d50ea4424600aba280a2b45f02bcc52bf07c/68747470733a2f2f61736369696e656d612e6f72672f612f3235343431322e737667)](https://asciinema.org/a/254412)

[![asciicast](https://camo.githubusercontent.com/e988b632cc27e1f5cbe1d2b518adb729e1b6886288eeeb5f90ec5f3930e50b17/68747470733a2f2f61736369696e656d612e6f72672f612f3235343539362e737667)](https://asciinema.org/a/254596)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity67

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

Total

17

Last Release

2458d ago

Major Versions

0.2.0 → 1.0.02019-06-29

1.2.3 → 2.0.02019-07-28

2.1.1 → 3.0.02019-08-12

### Community

Maintainers

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

---

Top Contributors

[![fidilly](https://avatars.githubusercontent.com/u/36198217?v=4)](https://github.com/fidilly "fidilly (124 commits)")

---

Tags

jsonyamlymldifference

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fidilly-gendiff/health.svg)

```
[![Health](https://phpackages.com/badges/fidilly-gendiff/health.svg)](https://phpackages.com/packages/fidilly-gendiff)
```

###  Alternatives

[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[thunderer/serializard

Flexible serializer

2767.3k1](/packages/thunderer-serializard)

PHPackages © 2026

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