Skip to main content
Version: 7.x

auditor-bundle

Symfony integration for the auditor library

Latest Stable Version License Total Downloads

What is auditor-bundle?

auditor-bundle integrates the auditor library into Symfony applications. It provides automatic service configuration, a web interface for browsing audits, and seamless integration with Symfony's security system.

✨ Key Features

  • 🔌 Automatic wiring - Services are automatically configured via Symfony's DI
  • 🔒 Security integration - Uses Symfony's security for user tracking and access control
  • 🌐 Built-in viewer - Web interface to browse audit logs at /audit
  • 🖥️ Console support - Tracks changes made via console commands
  • 🌍 Internationalization - Translations for 9 languages
  • ⚙️ YAML configuration - Simple configuration via dh_auditor.yaml
  • 📦 Extra Data - Attach custom contextual data to audit entries via event listeners

🏗️ Architecture Overview

The bundle bridges auditor with Symfony:

📦 What the Bundle Provides

ComponentService IDDescription
UserProviderdh_auditor.user_providerGets current user from TokenStorage
SecurityProviderdh_auditor.security_providerGets IP and firewall from Request
RoleCheckerdh_auditor.role_checkerChecks access via Security component
ConsoleUserProvider(internal)Tracks console command as user
ViewerController(internal)Web UI for audit logs
RoutingLoader(internal)Loads viewer routes

📋 Version Compatibility

VersionStatusRequirements
7.xActive development 🚀PHP >= 8.4, Symfony >= 8.0, Doctrine DBAL >= 4.0, Doctrine ORM >= 3.2
6.xActive supportPHP >= 8.2, Symfony >= 5.4
5.xEnd of LifePHP >= 7.4, Symfony >= 4.4
  • auditor - The core audit library (required)

📜 License

This bundle is released under the MIT License.