prooph / snapshot-mongodb-adapter
Snapshot MongoDB Adapter for ProophEventStore
Installs: 24 054
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 5
Open Issues: 1
Requires
- php: ^7.1
- ext-mongodb: ^1.5.2
- mongodb/mongodb: ^1.4.2
- prooph/common: ^3.7
- prooph/event-store: ^6.3
Requires (Dev)
- malukenho/docheader: ^0.1.4
- phpspec/prophecy: ^1.7
- phpunit/php-invoker: ^2.0
- phpunit/phpunit: ^7.1.4
- prooph/php-cs-fixer-config: ^0.2.2
- psr/container: ^1.0
- sandrokeil/interop-config: ^2.0.1
- satooshi/php-coveralls: ^1.0
Suggests
- psr/container: For usage of provided factories
- sandrokeil/interop-config: For usage of provided factories
This package is auto-updated.
Last update: 2024-12-17 02:00:58 UTC
README
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!
Set Up
How to use the adapter is explained in the prooph/event-store docs.
Interop Factory
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>
.
Requirements
- MongoDB >= 4.0
- MongoDB PHP Driver >= 1.5.2
Indexing
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
Support
- 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.
Contribute
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.
Dependencies
Please refer to the project composer.json for the list of dependencies.
License
Released under the New BSD License.