https://github.com/basster/doctrineelasticaloggableextension
This library utilizes Gedmo Loggable Doctrine Extension to persist the entity changes into elasticsearch via elastica.io.
https://github.com/basster/doctrineelasticaloggableextension
Last synced: 4 months ago
JSON representation
This library utilizes Gedmo Loggable Doctrine Extension to persist the entity changes into elasticsearch via elastica.io.
- Host: GitHub
- URL: https://github.com/basster/doctrineelasticaloggableextension
- Owner: Basster
- Created: 2017-10-27T20:03:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T15:39:52.000Z (almost 4 years ago)
- Last Synced: 2025-01-18T06:42:30.735Z (6 months ago)
- Language: PHP
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Basster/DoctrineElasticaLoggableExtension
========================[](https://insight.sensiolabs.com/projects/8663efc0-a078-4f28-82f0-c88d8e57b4e6) [](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/?branch=master) [](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/?branch=master) [](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/build-status/master)
This library utilizes Gedmo Loggable Doctrine Extension to persist the entity changes into elasticsearch via elastica.io.
To make it work in Symfony with Doctrine Extentions Bundle place the following config in your `services.yml`:
```yaml
# services.ymlservices:
# overwrite DoctrineExtensionsBundle default listener to inject the ElasticaLoggableListener
Stof\DoctrineExtensionsBundle\EventListener\LoggerListener:
arguments:
- '@Basster\ElasticaLoggable\Listener\ElasticaLoggableListener'
- '@security.token_storage'
- '@security.authorization_checker'
public: true
tags:
- {name: kernel.event_subscriber}# register the ElasticaLoggableListener as a service in your application
Basster\ElasticaLoggable\Listener\ElasticaLoggableListener:
public: true
arguments: ['@elastica.type.activity']
calls:
- [setAnnotationReader, ['@annotation_reader']]
tags:
- { name: doctrine.event_subscriber, connection: default }# overwrite doctrine extension service aliases
stof_doctrine_extensions.event_listener.logger: '@Basster\ElasticaLoggable\Listener\ElasticaLoggableListener'
stof_doctrine_extensions.listener.loggable: '@Basster\ElasticaLoggable\Listener\ElasticaLoggableListener'
```