homeapp/audit

Audit package for saving user activity

Installs: 7 109

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 8

Forks: 0

Open Issues: 1

Type:project

3.1.2 2023-08-08 13:34 UTC

This package is auto-updated.

Last update: 2024-12-08 16:24:02 UTC


README

To install

  1. composer require homeapp/audit
  2. bin/console doctrine:migrations:diff
  3. Отредактируйте миграцию и запустите.
  4. Создать сервис который имплементирует интервейс ActorInfoFetcherInterface и зарегестировать его.
 Homeapp\AuditBundle\ActorInfoFetcherInterface: '@App\Audit\ActorInfoFetcher'

PS: есть баг нужно добавить такой хак в service_test.yml

App\Audit\ActorInfoFetcher:
 autowire: true
 arguments:
   - '@test.service_container' #https://github.com/Codeception/module-symfony/issues/34
  1. Сконфигурировать Auditable класc. Передав в аргумент classMap список entity которые нужно трекать
 Homeapp\AuditBundle\Auditable:
     arguments:
         $classMap:
             - App\Entity\UserRole

TODO

  1. Write instruction
  2. Refactor migrations

For development

To fix code style issues

vendor/bin/php-cs-fixer fix

To run test

vendor/bin/phpunit

To run static analizer

vendor/bin/psalm --no-cache

TODO

  1. Remove minimum-stability: dev when BackwardCompatibilityCheck will be released 5.1 version