ibrows / loggable-bundle
扩展的Loggable Bundle
3.0.0-beta2
2022-05-25 13:35 UTC
Requires
- stof/doctrine-extensions-bundle: ^1.2.0
- symfony/symfony: ^3.0|^4.0|^5.0|^6.0
This package is auto-updated.
Last update: 2024-08-27 23:09:49 UTC
README
Symfony2 Bundle,能够跟踪项目中每个实体变化并保存到日志表中。这个Bundle可以让你的项目获得某种程度的确认性。
它还提供了一些方法来将实体恢复到早期版本。
安装 & 配置Bundle
-
在composer.json中添加IbrowsLoggableBundle
{ "require": { "ibrows/loggable-bundle": "~1.0", } }
-
现在运行以下命令让composer下载Bundle
$ php composer.phar update ibrows/loggable-bundle
Composer会将Bundle安装到项目的
ibrows/loggable-bundle
目录中。(PSR-4) -
将Bundle添加到你的
AppKernel
类中// app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), new Ibrows\LoggableBundle\IbrowsLoggableBundle(), // ... ); // ... }
-
推荐配置stof_doctrine_extensions
stof_doctrine_extensions: orm: default: softdeleteable: true loggable: true class: loggable: Ibrows\LoggableBundle\Listener\LoggableListener