tohmua / consolidare
Consolidare merge tool
v0.1.0
2016-10-30 10:40 UTC
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-04-26 22:05:52 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.