bentools/doctrine-watcher-bundle
A Symfony bundle for bentools/doctrine-watcher.
composer require bentools/doctrine-watcher-bundle:1.0.x-dev
There are 2 ways to configure the bundle:
# 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
# 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 }
MIT.
How can I help you explore Laravel packages today?