homeapp / audit

用于保存用户活动的审核包

安装次数: 7,101

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 8

分支: 0

开放问题: 1

类型:项目

3.1.2 2023-08-08 13:34 UTC

This package is auto-updated.

Last update: 2024-09-08 15:54:14 UTC


README

安装

  1. composer require homeapp/audit
  2. bin/console doctrine:migrations:diff
  3. 编辑迁移并运行。
  4. 创建一个实现接口ActorInfoFetcherInterface的服务并注册它。
 Homeapp\AuditBundle\ActorInfoFetcherInterface: '@App\Audit\ActorInfoFetcher'

PS:存在一个bug,需要在service_test.yml中添加这样一个hack

App\Audit\ActorInfoFetcher:
 autowire: true
 arguments:
   - '@test.service_container' #https://github.com/Codeception/module-symfony/issues/34
  1. 配置Auditable类。通过将需要跟踪的entity的列表传递给classMap参数
 Homeapp\AuditBundle\Auditable:
     arguments:
         $classMap:
             - App\Entity\UserRole

待办事项

  1. 编写说明
  2. 重构迁移

开发

修复代码风格问题

vendor/bin/php-cs-fixer fix

运行测试

vendor/bin/phpunit

运行静态分析器

vendor/bin/psalm --no-cache

待办事项

  1. 当BackwardCompatibilityCheck发布5.1版本时,移除minimum-stability: dev