bentools / doctrine-watcher-bundle
此包已被弃用且不再维护。没有建议的替代包。
bentools/doctrine-watcher 的 Symfony Bundle
dev-master / 1.0.x-dev
2019-01-09 16:53 UTC
Requires
- php: >=7.1
- bentools/doctrine-watcher: *
- symfony/http-kernel: ^2.8|^3.0|^4.0
Requires (Dev)
- doctrine/doctrine-bundle: ^1.9
- nyholm/symfony-bundle-test: ^1.4
- phpunit/phpunit: ^5.0|^6.0|^7.0
- symfony/config: ^4.0
- symfony/dependency-injection: ^3.0|^4.0
- symfony/framework-bundle: ^3.0|^4.0
- symfony/http-foundation: ^3.0|^4.0
- symfony/routing: ^3.0|^4.0
- symfony/security: ^3.0|^4.0
- symfony/var-dumper: ^3.0|^4.0
- symfony/yaml: ^3.0|^4.0
This package is auto-updated.
Last update: 2022-06-14 12:04:22 UTC
README
为 bentools/doctrine-watcher 提供的 Symfony Bundle。
安装
composer require bentools/doctrine-watcher-bundle:1.0.x-dev
配置
配置此包有2种方式
通过 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.