Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 4 hours 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T15:39:52.000Z (about 3 years ago)
- Last Synced: 2024-04-27T09:42:45.084Z (7 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
========================[![SensioLabsInsight](https://insight.sensiolabs.com/projects/8663efc0-a078-4f28-82f0-c88d8e57b4e6/mini.png)](https://insight.sensiolabs.com/projects/8663efc0-a078-4f28-82f0-c88d8e57b4e6) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/Basster/DoctrineElasticaLoggableExtension/badges/build.png?b=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'
```