viktor/differ
Composer 安装命令:
composer require viktor/differ
包简介
Calculate differencies in config files. Second project in PHP proffession.
README 文档
README
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)
Usage examples
Flat JSON
Flat YAML
Recursive JSON
Recursive YAML
Output in JSON and plain format
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.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-30