Add audit system core with event handling and subject conversion

- Implemented `AuditEvent` class to represent audit events.
- Added `AuditEvent2Trail` for converting events to audit trails.
- Introduced `Subject` and `SubjectConverterManager` for subject conversion.
- Created contracts like `SubjectConverterInterface` and `AuditEvent2TrailInterface`.
- Developed `AuditEventSubscriber` to persist audit events using `AuditTrailPersister`.
- Included test classes for core audit services and components.
This commit is contained in:
2026-01-23 17:33:48 +01:00
parent ed41224d7a
commit 6bbdc858bd
12 changed files with 485 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Audit;
interface SubjectConverterInterface
{
/**
* @return Subject|list<Subject>
*/
public function convert(mixed $subject): Subject|array;
public function supportsConvert(mixed $subject): bool;
public static function getDefaultPriority(): int;
}