nikitovskij/php-gendiff

CLI utility for finding discrepancies in configuration files.

v0.7.2 2020-11-04 14:47 UTC

README

PHP GenDiff Project Status: Active – The project has reached a stable, usable state and is being actively developed. Maintainability Test Coverage

This is a program that determines the difference between two data structures.

Utility features:

  • Support for different input formats: yaml and json
  • Generating a report in plain text, stylish and json format

Requirements

Setup

$ git clone https://github.com/nikitovskij/php-gendiff.git

$ make install

Composer

$ composer require nikitovskij/php-gendiff

Testing

$ make test

Lint

$ make lint 

Examples

php-gendiff: json

$ gendiff /path/to/file/first.json /path/to/file/second.json

Link to asciinema

php-gendiff: yml

$ gendiff /path/to/file/first.yml /path/to/file/second.yml

Link to asciinema

php-gendiff: pretty format output

The pretty output format is set by default.

$ gendiff /path/to/file/first.json /path/to/file/second.json

or

$ gendiff --format pretty /path/to/file/first.json /path/to/file/second.json

Link to asciinema:asciinema

php-gendiff: plain format output

$ gendiff --format plain /path/to/file/first.json /path/to/file/second.json

Link to asciinema

php-gendiff: json format output

$ gendiff --format json /path/to/file/first.json /path/to/file/second.json

Link to asciinema