PHPackages                             chgst/chgst-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. chgst/chgst-bundle

ActiveLibrary

chgst/chgst-bundle
==================

Symfony bundle for chgst

0.7.0(2mo ago)0129↓100%MITPHPPHP ^8.0

Since Sep 18Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/chgst/chgst-bundle)[ Packagist](https://packagist.org/packages/chgst/chgst-bundle)[ RSS](/packages/chgst-chgst-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (14)Used By (0)

Symfony bundle for chgst library
================================

[](#symfony-bundle-for-chgst-library)

[![Version](https://camo.githubusercontent.com/53895a66eb4b39fbdff088b0717f3cb4864f070adcbdfc2a430d03f8d77aa961/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63686773742f63686773742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chgst/chgst-bundle)[![CircleCI](https://camo.githubusercontent.com/63898821aca6e722b059ddf6288acf4e73eeb819cd83c38fc94f98d2c28211f9/68747470733a2f2f646c2e636972636c6563692e636f6d2f7374617475732d62616467652f696d672f636972636c6563692f55694d534465355134334e3772525a4b6f77567571322f4b47377a764762513572626d355258637369426361572f747265652f646576656c6f702e7376673f7374796c653d736869656c64)](https://dl.circleci.com/status-badge/redirect/circleci/UiMSDe5Q43N7rRZKowVuq2/KG7zvGbQ5rbm5RXcsiBcaW/tree/develop)[![Coverage Status](https://camo.githubusercontent.com/ccf6e61f97284cea7b4737b5161338077c59f1d0be3d93e191e04abb31f71680/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f63686773742f63686773742d62756e646c652f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/chgst/chgst-bundle?branch=develop)[![License](https://camo.githubusercontent.com/381ee45b1bfd2cc97792062e73c6ef90c99fa271423170aa41f69636a38dc15c/68747470733a2f2f706f7365722e707567782e6f72672f63686773742f63686773742d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/chgst/chgst-bundle)

Before Install
--------------

[](#before-install)

Make sure you have Symfony Security installed:

```
composer require security
```

Installation
------------

[](#installation)

```
composer require chgst/chgst-bundle chgst/persistence-doctrine
```

Configuration
-------------

[](#configuration)

Set your event repository service for persisting events to data store

```
# config/packages/chgst.yaml
chgst:
  enable_listeners: true

# Make sure you disable listeners in test/dev environment
when@dev:
  chgst:
    enable_listeners: false

when@test:
  chgst:
    enable_listeners: false
```

Add repository service to your services configuration

```
# config/services.yaml
services:

    # For ORM
    Chgst\Event\RepositoryInterface:
        public: true
        class: Chgst\Event\ObjectRepository
        arguments: [ '@doctrine.orm.entity_manager', 'App\Entity\DefaultEvent' ]

    # For MongoDB ODM
    Chgst\Event\RepositoryInterface:
        public: true
        class: Chgst\Event\ObjectRepository
        arguments: [ '@doctrine_mongodb.odm.document_manager', 'App\Document\DefaultEvent' ]
```

Create Doctrine model class for your events

```
