rcsofttech / audit-trail-bundle
Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.
Fund package maintenance!
rcsofttech85
Installs: 373
Dependents: 0
Suggesters: 0
Security: 0
Stars: 77
Watchers: 3
Forks: 3
Open Issues: 0
Type:symfony-bundle
pkg:composer/rcsofttech/audit-trail-bundle
Requires
- php: ^8.4
- doctrine/doctrine-bundle: ^3.1
- doctrine/orm: ^3.6
- symfony/expression-language: ^7.4|^8.0
- symfony/framework-bundle: ^7.4|^8.0
- symfony/http-client: ^7.4|^8.0
- symfony/messenger: ^7.4|^8.0
- symfony/security-bundle: ^7.4|^8.0
- symfony/uid: ^7.4|^8.0
- symfony/validator: ^7.4|^8.0
- symfony/var-exporter: ^7.4|^8.0
- symfony/yaml: ^7.4|^8.0
Requires (Dev)
- easycorp/easyadmin-bundle: ^4.27
- friendsofphp/php-cs-fixer: ^3.60
- infection/infection: ^0.32.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-doctrine: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpstan/phpstan-symfony: *
- phpunit/phpunit: ^12.5
- spaze/phpstan-disallowed-calls: ^4.7
- symfony/phpunit-bridge: ^7.4|^8.0
Suggests
- easycorp/easyadmin-bundle: Required to use the provided AuditLogCrudController for a built-in dashboard.
- dev-main
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.5
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.1
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.0.1
- v1.0.0
- dev-readme
- dev-reduce-complexity
- dev-ci-setup
- dev-docs
- dev-upgrade-ci
- dev-easy-admin
- dev-dependabot/composer/symfony/process-8.0.5
- dev-dependabot/composer/phpunit/phpunit-12.5.8
- dev-security-fix
- dev-code-editor-field-error
- dev-entity-discovery
- dev-verify-integrity
- dev-audit-log-cross-platform-serializer
This package is auto-updated.
Last update: 2026-02-02 12:27:29 UTC
README
Enterprise-grade, high-performance audit trail solution for Symfony.
AuditTrailBundle is a modern, lightweight bundle that automatically tracks and stores Doctrine ORM entity changes. Built for performance and compliance, it uses a unique Split-Phase Architecture to ensure your application stays fast even under heavy load.
Documentation
| Topic | Description |
|---|---|
| Installation & Setup | Getting started guide. |
| Configuration | Full configuration reference (enabled, transports, integrity). |
| Advanced Usage | Attributes, Conditional Auditing, Impersonation, Custom Context. |
| Transports | Doctrine, HTTP, and Queue (Messenger) transport details. |
| Audit Reader | Querying audit logs programmatically. |
| Revert & Recovery | Point-in-time restoration of entities. |
| Security & Integrity | Data masking, cryptographic signing, and verification. |
| CLI Commands | Console commands for listing, purging, and exporting logs. |
| Integrations | EasyAdmin support. |
| Serialization | Cross-platform JSON format. |
| Benchmarks | Performance report. |
Key Features
- High Performance: Non-blocking audits using a Split-Phase Architecture (capture in
onFlush, dispatch inpostFlush). - Multiple Transports: Doctrine, HTTP (ELK/Splunk), Queue (RabbitMQ/Redis).
- Deep Collection Tracking: Tracks Many-to-Many and One-to-Many changes with precision.
- Sensitive Data Masking: Native support for
#[SensitiveParameter]and custom#[Sensitive]attributes. - Safe Revert Support: Easily roll back entities to any point in history.
- Conditional Auditing: Skip logs based on runtime conditions.
- Rich Context: Tracks IP, User Agent, Impersonation, and custom metadata.
Quick Start
1. Installation
composer require rcsofttech/audit-trail-bundle
2. Database Setup (Doctrine Transport)
If you are using the Doctrine Transport (default), update your database schema:
php bin/console make:migration php bin/console doctrine:migrations:migrate
3. Basic Usage
Add the #[Auditable] attribute to any Doctrine entity you want to track.
use Rcsofttech\AuditTrailBundle\Attribute\Auditable; #[ORM\Entity] #[Auditable(ignoredProperties: ['internalCode'])] class Product { #[ORM\Id, ORM\GeneratedValue, ORM\Column] private ?int $id = null; #[ORM\Column] private string $name; }
Requirements
- PHP 8.4+
- Symfony 7.4+
- Doctrine ORM 3.0+
License
MIT License.