{"id":23782680,"url":"https://github.com/ihalavin/gendiff","last_synced_at":"2025-10-30T10:09:16.080Z","repository":{"id":62506520,"uuid":"456593523","full_name":"ihalavin/gendiff","owner":"ihalavin","description":"Structure differences finder","archived":false,"fork":false,"pushed_at":"2022-03-11T14:25:52.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T22:36:01.014Z","etag":null,"topics":["data-structures","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ihalavin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-07T16:48:36.000Z","updated_at":"2022-04-02T16:36:10.000Z","dependencies_parsed_at":"2022-11-02T12:31:15.312Z","dependency_job_id":null,"html_url":"https://github.com/ihalavin/gendiff","commit_stats":null,"previous_names":["ihalavin/gendiff","foreachq/gendiff"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ihalavin/gendiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihalavin%2Fgendiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihalavin%2Fgendiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihalavin%2Fgendiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihalavin%2Fgendiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ihalavin","download_url":"https://codeload.github.com/ihalavin/gendiff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihalavin%2Fgendiff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281786416,"owners_count":26561348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","php"],"created_at":"2025-01-01T12:18:45.688Z","updated_at":"2025-10-30T10:09:16.006Z","avatar_url":"https://github.com/ihalavin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PHP CI](https://github.com/ForeachQ/gendiff/actions/workflows/php-ci.yml/badge.svg)](https://github.com/ForeachQ/gendiff/actions/workflows/php-ci.yml)\n\u003ca href=\"https://codeclimate.com/github/ForeachQ/gendiff/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/a176cc0a7d5d5cd1aaf3/maintainability\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/ForeachQ/gendiff/test_coverage\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/a176cc0a7d5d5cd1aaf3/test_coverage\" /\u003e\u003c/a\u003e\n\n# Gendiff\n\n«Gendiff» — a program that finds the difference between two data structures.\n\n## Description\n\nCan be used as a separate CLI application or imported as a php package.\n\nProgram gets 2 paths and output format as input and returns structures differences in user defined format.\n\nUtility features:\n- Recursive processing;\n- Support for different input formats: yaml and json;\n- Report generation in the form of plain text, \"stylish\" and json.\n\n## Requirements\n\n- php 7.4\n- composer 2.*\n\n## Installation\n\n### Php package\n```bash\ncomposer require foreachq/gendiff\n```\n\n### Cli application\n- Download package\n\n```bash\ncomposer create-project foreachq/gendiff\n```\n\n- Install dependencies\n\n```\nmake install\n```\n\n## Usage\n\n### CLI\n```bash\n# format plain\n$ ./gendiff --format plain path/to/file.yml another/path/file.json\n\nProperty 'common.follow' was added with value: false\nProperty 'group1.baz' was updated. From 'bas' to 'bars'\nProperty 'group2' was removed\n\n# format by default (stylish)\n$ ./gendiff filepath1.json filepath2.json\n\n{\n  + follow: false\n    setting1: Value 1\n  - setting2: 200\n  - setting3: true\n  + setting3: {\n        key: value\n    }\n  + setting4: blah blah\n  + setting5: {\n        key5: value5\n    }\n}\n\n$ ./gendiff -h # for help\n```\n\n### Php package\n```php\nuse function Differ\\Differ\\genDiff;\n\n// formats: stylish (default), plain, json\n$diff = genDiff($pathToFile1, $pathToFile2, $format);\nprint_r($diff);\n```\n\n## Asciinemas of usage\n\n- [gendiff-stylish](https://asciinema.org/a/469671)\n- [gendiff-plain](https://asciinema.org/a/469672)\n- [gendiff-json](https://asciinema.org/a/469673)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihalavin%2Fgendiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fihalavin%2Fgendiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihalavin%2Fgendiff/lists"}