MongoDB Adapter for the Snapshot Store
#CAUTION: Support for the adapter will end at 31 December 2017. Use https://github.com/prooph/mongodb-snapshot-store instead!
How to use the adapter is explained in the prooph/event-store docs.
Some general notes about how to use interop factories shipped with prooph components can be found in the event store docs.
Use the mongodb snapshot adapter factory to set up the adapter. If your IoC container supports callable factories
you can register the factory under a service id of your choice and configure this service id as $config['prooph']['snapshot_store']['adpater']['type'] = <adapter_service_id>
.
- MongoDB >= 4.0
- MongoDB PHP Driver >= 1.5.2
For faster access to the snapshots, it's recommended to index the metadata.
For example:
db.[your snapshot collection].files.createIndex({"metadata.aggregate_type": 1, "metadata.aggregate_id": 1, "metadata.last_version": -1});
or use \Prooph\EventStore\Snapshot\Adapter\MongoDb\MongoDbSnapshotAdapter::createIndexes
- Ask questions on prooph-users google group.
- File issues at https://github.com/prooph/snapshot-mongodb-adapter/issues.
- Say hello in the prooph gitter chat.
Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.
Please refer to the project composer.json for the list of dependencies.
Released under the New BSD License.