diff --git a/composer.json b/composer.json index af4c394..7f178b3 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "prefer-stable": true, "require": { "php": "^7.1", - "prooph/snapshot-store" : "^1.1" + "prooph/snapshot-store" : "^1.1", "mongodb/mongodb": "^1.1.0" }, "require-dev": { @@ -66,10 +66,12 @@ "scripts": { "check": [ "@cs", - "@test" + "@test", + "docheader" ], "cs": "php-cs-fixer fix -v --diff --dry-run", "cs-fix": "php-cs-fixer fix -v --diff", + "docheader": "docheader check src/ tests/", "test": "phpunit" } } diff --git a/docs/bookdown.json b/docs/bookdown.json index 1cd7134..497a868 100644 --- a/docs/bookdown.json +++ b/docs/bookdown.json @@ -1,9 +1,11 @@ { - "title": "Prooph PDO SnapshotStore", + "title": "MongoDB Snapshot Store", "content": [ - {"intro": "../README.md"}, + {"intro": "introduction.md"}, {"interop_factories": "interop_factories.md"} ], + "tocDepth": 1, + "numbering": false, "target": "./html", "template": "../vendor/prooph/bookdown-template/templates/main.php" } diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000..57e590b --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1,15 @@ +# Overview + +MongoDB implementation of snapshot store + +## Installation + +```bash +composer require prooph/mongodb-snapshot-store +``` + +## Requirements + +- PHP 7.1 +- MongoDB >= 3.4 +- PHP MongoDB Extension \ No newline at end of file diff --git a/tests/Container/MongoDbSnapshotStoreFactoryTest.php b/tests/Container/MongoDbSnapshotStoreFactoryTest.php index 6ee5413..602c0f8 100644 --- a/tests/Container/MongoDbSnapshotStoreFactoryTest.php +++ b/tests/Container/MongoDbSnapshotStoreFactoryTest.php @@ -72,7 +72,9 @@ public function it_gets_serializer_from_container_when_not_instanceof_serializer $container->get('my_connection')->willReturn($client)->shouldBeCalled(); $container->get('config')->willReturn($config)->shouldBeCalled(); - $container->get('serializer_servicename')->willReturn(new CallbackSerializer(function() {}, function() {}))->shouldBeCalled(); + $container->get('serializer_servicename')->willReturn(new CallbackSerializer(function () { + }, function () { + }))->shouldBeCalled(); $factory = new MongoDbSnapshotStoreFactory(); $snapshotStore = $factory($container->reveal());