PHPackages                             viktor/differ - 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. viktor/differ

ActiveLibrary

viktor/differ
=============

Calculate differencies in config files. Second project in PHP proffession.

v0.1.2(6y ago)023MITPHPCI failing

Since Jan 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vitek-mo/php-project-lvl2)[ Packagist](https://packagist.org/packages/viktor/differ)[ RSS](/packages/viktor-differ/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

Differ (php-project-lvl2)
=========================

[](#differ-php-project-lvl2)

[![](https://camo.githubusercontent.com/37080208ec63536f00e85098d2d9346ff54c3dc037ccd30711ca86d9ada9d9a9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31393833376438623363343636343836346135632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/vitek-mo/php-project-lvl2/maintainability)[![](https://camo.githubusercontent.com/166ec00a67bc6b5355bf04bcbe3d025447bee2f9d38212ebee6e47276f4497df/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31393833376438623363343636343836346135632f746573745f636f766572616765)](https://codeclimate.com/github/vitek-mo/php-project-lvl2/test_coverage)[![](https://camo.githubusercontent.com/3fb05d14ac135044bb89cd59a495a3ec3b0623dc71bc86cdb0074005f0925103/68747470733a2f2f7472617669732d63692e6f72672f766974656b2d6d6f2f7068702d70726f6a6563742d6c766c322e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vitek-mo/php-project-lvl2)

**Description**
Compare difference between configuration files. Supported files types:

- JSON
- YAML File should have appropriate extension to correctly interpret file type it - "json" or "yml".

**Installation**Can be installed globally with composer using

```
composer require global viktor/differ:*

```

or use function from library in your project

```
\Differ\Analyzer\genDiff($path1, $path2, $format)

```

**Installation example**
[![asciicast](https://camo.githubusercontent.com/129aa5777814911c1e14d4d487d043d56a9869d166be70a00dcd20938652b56e/68747470733a2f2f61736369696e656d612e6f72672f612f61784f4f4b3574566d524344626b657561644c4170446d4c352e737667)](https://asciinema.org/a/axOOK5tVmRCDbkeuadLApDmL5)

**Usage examples**
**Flat JSON**
[![asciicast](https://camo.githubusercontent.com/1a6e3bebc0bb9db6fd89268dc2ee0b1201526fd058d9f807d7d38d1724ba2afa/68747470733a2f2f61736369696e656d612e6f72672f612f4b43766b4d7252796f364c536f6f52466154774539723067382e737667)](https://asciinema.org/a/KCvkMrRyo6LSooRFaTwE9r0g8)**Flat YAML**
[![asciicast](https://camo.githubusercontent.com/a5f8d9cc03852ae2d2e1025bc4bb7d88f1dc19e0b61621f526505bdb5c2457c0/68747470733a2f2f61736369696e656d612e6f72672f612f6c504f585839776a6e78426551726a6c336c4d6f726a61304b2e737667)](https://asciinema.org/a/lPOXX9wjnxBeQrjl3lMorja0K)**Recursive JSON**
[![asciicast](https://camo.githubusercontent.com/3e6a16b153b2525faf71fcb44a5692d6f7095d5a3318d41e0d28be62783179be/68747470733a2f2f61736369696e656d612e6f72672f612f794a544c464349627654766d554a77716f32466846713453482e737667)](https://asciinema.org/a/yJTLFCIbvTvmUJwqo2FhFq4SH)**Recursive YAML**[![asciicast](https://camo.githubusercontent.com/57e3ee69396afaa919eaa61255539acceffa1e82ac42c86ad029c50fd26e70d2/68747470733a2f2f61736369696e656d612e6f72672f612f71696f4f4b34486633474e434132724571497852675a764b6b2e737667)](https://asciinema.org/a/qioOK4Hf3GNCA2rEqIxRgZvKk)**Output in JSON and plain format**
[![asciicast](https://camo.githubusercontent.com/3db2f0eb2bd00d269a61191a470e7030501a96d902ea3f8293f488fb3f035213/68747470733a2f2f61736369696e656d612e6f72672f612f465956767855556b64644e516d4a6a6d4a39644256503232702e737667)](https://asciinema.org/a/FYVvxUUkddNQmJjmJ9dBVP22p)

P.S. I have faced one trouble during writing project. I have ubuntu 18.04, and there is alreday gendiff file which can be called from any place (global). It is located in /usr/bin/gendiff. If you install my gendiff and will try to run it, you will/may run /usr/bin/gendiff. So, if you want to globally run my gendiff, you need to change order of PATHs in $PATH. I was able to do this by modifying file ~/.bashrc. There is a line like "PATH=$PATH" or "PATH=$PATH:$HOME/.composer/vendor/bin" if you already added composer bin path. Modify it like this "PATH=$HOME/.composer/vendor/bin:$PATH", reboot, and problem will be solved. It is possible that after some time /usr/bin/gendiff will be dicovered first. Reboot will help.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

7

Last Release

2307d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/726891?v=4)[vitek-mo](/maintainers/vitek-mo)[@vitek-mo](https://github.com/vitek-mo)

---

Top Contributors

[![vitek-mo](https://avatars.githubusercontent.com/u/726891?v=4)](https://github.com/vitek-mo "vitek-mo (81 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/viktor-differ/health.svg)

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

PHPackages © 2026

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