nikitovskij / php-gendiff
CLI utility for finding discrepancies in configuration files.
v0.7.2
2020-11-04 14:47 UTC
Requires
- docopt/docopt: *
- funct/funct: ^1.0@dev
- symfony/yaml: ^5.1
Requires (Dev)
- phpstan/phpstan: ^0.12.42
- phpunit/phpunit: ^9.3
- squizlabs/php_codesniffer: ^3.0@dev
README
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
- PHP >= 7.4
- funct library
- CLI parser (docopt)
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