- Updated methods to accept `string|TranslatableInterface` for label parameters, allowing translation capabilities.
- Added `Symfony\Contracts\Translation\TranslatableInterface` imports in both classes.
- Replaced `Subject|array` return types with `SubjectBag` in `SubjectConverterInterface` for more robust handling.
- Updated `getSubjectsForEntity` to include an optional `$includeAssociated` parameter for finer control over associated subject resolution.
- Refactored `AuditEvent` to differentiate `mainSubject` from associated subjects, improving clarity in audit logging.
- Introduced database schema changes to add `main_subject` and `subjects` columns in the `chill_main_audit_trail` table.
- Added `SubjectBag` class for grouped subject management and implemented deduplication logic.
- Updated all converters and test cases to use the new `SubjectBag` approach, ensuring compatibility.
- Improved event dispatching in controllers to utilize the updated `AuditEvent` structure and refined metadata handling.
- Removed redundant null-check logic for `user_id` assignment.
- Updated query to directly handle optional users with safe navigation and nullable type support.
- Changed `getUser` method in `AuditTrail` to allow null values by updating the return type to `?User`.
- Updated `insert` method in `AuditTrailRepository` to handle nullable users, ensuring the `user_id` parameter is set only when applicable.
- Improved code robustness by adding null-check logic for user assignment in the SQL query.
- Removed `convertEntityToSubjects` method from `SubjectConverterManager` and updated all references to use `getSubjectsForEntity`.
- Ensured `getSubjectsForEntity` always returns an array by wrapping single `Subject` instances.
- Replaced manual type handling in converters with `array_push` and improved code clarity in `AuditEvent2Trail` and related tests.
- Updated and fixed tests for the modified subject conversion logic to maintain coverage.
- Implemented `AccompanyingPeriodWorkSubjectConverter` to handle subject conversion for accompanying period work entities.
- Added unit tests to ensure proper functionality of the new converter.
- Integrated `AuditEvent` dispatching into `AccompanyingCourseWorkController` for viewing and listing accompanying period works.
- Added `AccompanyingPeriodSubjectConverter` to handle subject conversion for accompanying periods.
- Integrated `AuditEvent` dispatching into `AccompanyingCourseController` for key actions (e.g., create, view, update, delete, reopen).
- Extended translations to include audit-related messages for accompanying periods.
- Introduced tests for `AccompanyingPeriodSubjectConverter` to ensure proper functionality.
- Introduced `SubjectConverterManagerAwareTrait` and `SubjectConverterManagerAwareInterface` for injecting subject converter manager into converters.
- Added `getSubjectsForEntity` method in `SubjectConverterManager` to centralize subject retrieval logic.
- Updated converters to set the subject converter manager when applicable.
- Updated `PersonController` to dispatch `AuditEvent` with `AUDIT_VIEW` action instead of `PrivacyEvent`.
- Added necessary `AuditEvent` and `AuditTrail` imports to the controller.
- Registered `SubjectConverterInterface` for autoconfiguration with the `chill_main.audit_subject_converter` tag.
- Added `audit.yaml` to configure audit-related services and enable service discovery for the `Audit` namespace.
- Updated `services.yaml` to include the new `audit.yaml` configuration.
- Created `PersonSubjectConverter` class implementing `SubjectConverterInterface` to convert `Person` entities into `Subject` instances.
- Registered the `Audit` namespace in `services.yaml` to enable automatic service discovery.
- Replaced `array_map` with `array_reduce` in `AuditEvent2Trail` for flattening converted subjects.
- Enhanced `SubjectConverterInterface` with a `supportsConvert` method and PHPStan annotations to improve type safety and flexibility.
- Introduced `AuditTrailPersisterInterface` to define the persisting contract.
- Updated `AuditTrailPersister` to implement the interface and delegate persistence to `AuditTrailRepository`.
- Added `AuditTrailRepository` with `persistImmediately` method to save audit trails directly to the database.
- 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.