nikitovskij / php-gendiff
用于查找配置文件差异的命令行工具。
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
这是一个确定两个数据结构之间差异的程序。
实用功能
- 支持不同的输入格式:yaml 和 json
- 生成纯文本、样式化文本和 json 格式的报告
要求
- PHP >= 7.4
- funct 库
- 命令行解析器(docopt)
设置
$ git clone https://github.com/nikitovskij/php-gendiff.git
$ make install
Composer
$ composer require nikitovskij/php-gendiff
测试
$ make test
代码检查
$ make lint
示例
php-gendiff: json
$ gendiff /path/to/file/first.json /path/to/file/second.json
查看 asciinema
php-gendiff: yml
$ gendiff /path/to/file/first.yml /path/to/file/second.yml
查看 asciinema
php-gendiff: 美化格式输出
默认设置是 美化 输出格式。
$ 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
查看 asciinema:asciinema
php-gendiff: 纯文本格式输出
$ gendiff --format plain /path/to/file/first.json /path/to/file/second.json
查看 asciinema
php-gendiff: json 格式输出
$ gendiff --format json /path/to/file/first.json /path/to/file/second.json
查看 asciinema