bentools/doctrine-watcher-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony Bundle for bentools/doctrine-watcher

Installs: 1 228

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master / 1.0.x-dev 2019-01-09 16:53 UTC

This package is auto-updated.

Last update: 2022-06-14 12:04:22 UTC


README

A Symfony bundle for bentools/doctrine-watcher.

Installation

composer require bentools/doctrine-watcher-bundle:1.0.x-dev

Configuration

There are 2 ways to configure the bundle:

Via bundle configuration

# app/config/config.yml or config/packages/doctrine_watcher.yaml with Symfony Flex
doctrine_watcher:
    watch:
        App\Entity\Book:
            properties:
                title:
                    callback: 'App\Services\BookWatcher::onTitleChange'
                reviews:
                    callback: 'App\Services\BookWatcher::onReviewsChange'
                    iterable: true

Via service tags

# app/config/services.yml or config/services.yaml with Symfony Flex
services:
    App\Services\BookWatcher:
        tags:
            - { name: bentools.doctrine_watcher, entity_class: App\Entity\Book, property: 'title', method: 'onTitleChange' }
            - { name: bentools.doctrine_watcher, entity_class: App\Entity\Book, property: 'reviews', method: 'onReviewsChange', iterable: true }

License

MIT.