arkadiy / php-project2
A command-line tool educational project
Installs: 10
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/arkadiy/php-project2
Requires
- docopt/docopt: ^1.0
- funct/funct: ^1.5
- phpunit/phpunit: ^7.5
- symfony/yaml: ^4.3
- tightenco/collect: ^5.8
Requires (Dev)
README
Description
A command line utility for generating differences between two configurational files. Supporting file formats:
- json
- yaml
This is an educational project for hexlet.
Installation
In order to install and run the utility:
composer global require arkadiy/php-project2
Usage
gendiff -h
Generate diff
Usage:
gendiff (-h|--help)
gendiff [--format <fmt>] <firstFile> <secondFile>
Options:
-h --help Show this screen
--format <fmt> Report format [default: pretty]
It is possible to run the utility directly in the terminal with the command:
composer global require arkadiy/php-project2
It is possible to use the code as a library as well:
use function \Gendiff\genDiff;
Supported config formats
This util supports two different configuration files formats:
- json
- yaml
JSON
YAML
Deep nested configurational files
The util is able to read config files with deep nesting also.
Output formats
The output formats are 3:
- pretty (default format, example is shown in previous videp)
- plain
- json
PLAIN FORMAT
JSON FORMAT
Tests
This project includes unit testing. It is possible to run the tests with:
make test