tohmua / consolidare
Consolidare merge tool
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 2
pkg:composer/tohmua/consolidare
Requires
- php: ^5.6 || ^7.0
Requires (Dev)
- phpspec/prophecy: ^1.6
- phpunit/phpunit: ^5.6
This package is not auto-updated.
Last update: 2025-09-28 00:13:30 UTC
README
Consolidare
This tool tries to make merging multiple "things" of any type easy and automated in an (hopefully) less opinionated fashion.
Install
composer require tohmua/consolidare
Use
$merge = new Consolidare\Merge(); $merge->data('{"id": 10}'); $merge->data(['name' => 'foo', 'email' => 'bar']); $merge->data(['email' => 'test@test.com']); $result = $merge->merge(Consolidare\MergeStrategy\MergeStrategyFactory::basic()); $result->retrieve(new Consolidare\ReturnType\Type\ToArray); // ['id' => 10, 'name' => 'foo', 'email' => 'test@test.com']
Wiki
More info is available in the Wiki
Tests
To run: composer test
The code coverage report can be found in tests/_output
however this is git ignored but it will be generated automatically for you when you run the test suite.