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
Requires
- doctrine/migrations: ^2|^3
- doctrine/orm: ^2|^3
- ramsey/uuid: ^4
- symfony/config: ^5|^4
- symfony/dependency-injection: ^5|^4
- symfony/http-kernel: ^5|^4
- symfony/serializer: ^5|^4
Requires (Dev)
- php: ^7.4|^8.0
- fakerphp/faker: ^1.22
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- symfony/yaml: ^5.3
- vimeo/psalm: ^4.7
README
To install
composer require homeapp/audit
bin/console doctrine:migrations:diff
- Отредактируйте миграцию и запустите.
- Создать сервис который имплементирует интервейс 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
- Сконфигурировать Auditable класc. Передав в аргумент classMap список entity которые нужно трекать
Homeapp\AuditBundle\Auditable:
arguments:
$classMap:
- App\Entity\UserRole
TODO
- Write instruction
- 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
- Remove minimum-stability: dev when BackwardCompatibilityCheck will be released 5.1 version