mtt-pimcore-plugin/audit-plugin
最新稳定版本:1.0.1
Composer 安装命令:
composer require mtt-pimcore-plugin/audit-plugin
包简介
Pimcore Audit Logging Plugin with Symfony Messenger Queue support.
README 文档
README
The MTT (Minds Task Technologies) Pimcore Audit Bundle provides audit logging functionality for Pimcore using Symfony Messenger.
All actions are logged into a custom database table and processed asynchronously via a Doctrine-backed queue.
🚀 Installation Steps
✅ Step 1: Require the Bundle
Run the following in your Pimcore project root:
composer require mtt-pimcore-plugin/audit-plugin
✅ Step 2: Enable the Bundle (If Not Auto-Enabled)
Check and register the bundle manually in config/bundles.php if needed:
return [
// ...
PimcoreAuditBundle\PimcoreAuditBundle::class => ['all' => true],
];
✅ Step 3: Install the Bundle
Run the Pimcore installer to set up the required audit_log table:
bin/console pimcore:bundle:install PimcoreAuditBundle
✅ Step 4: Start the Messenger Worker
The bundle automatically registers the Symfony Messenger transport and routing.
To process queued audit log messages, run:
bin/console messenger:consume audit_log
⚠️ In production, supervise this process using Supervisor, systemd, Docker, etc.
✅ Step 5: Uninstall the Bundle (Optional)
To drop the audit log table and clean up:
bin/console pimcore:bundle:uninstall PimcoreAuditBundle
✅ Step 6: Start the Messenger Worker To process audit log messages asynchronously, you need to run the Symfony Messenger worker for the audit_log transport.
▶️ Run Locally (Development): bash
bin/console messenger:consume audit_log
Keep this process running in a separate terminal tab while working locally.
⚙️ Run in Production (Supervised): In a production environment, you should supervise the worker process to ensure it restarts automatically if it fails.
📦 Features
The MTT (Minds Task Technologies) Pimcore Audit Bundle provides robust audit logging capabilities for all key Pimcore entities — Data Objects, Documents, and Assets. It integrates with the Symfony Messenger component to ensure that logs are processed asynchronously, improving application performance and reliability.
🗂️ Entity Change Tracking The bundle tracks create, update, and delete actions for the following Pimcore elements:
Data Objects: Logs whenever an object is saved or deleted, including full metadata and payload data.
Documents: Tracks changes to Pimcore documents, capturing save and delete events.
Assets: Monitors save and delete operations on uploaded files and media. Each of these actions is recorded with detailed information, ensuring traceability across the system.
📨 Asynchronous Processing via Symfony Messenger All audit logs are queued and processed asynchronously using Symfony Messenger.
This ensures that logging does not block or slow down Pimcore operations like saving an object or uploading an asset.
The bundle automatically configures and uses the audit_log transport channel — no manual Messenger config required.
🛢️ Custom Database Table Audit logs are stored in a dedicated table: audit_log. Each log entry includes rich context such as:
Entity Type (Object, Document, Asset)
Action performed (save/delete)
Object ID
Class Name (for Data Objects)
Request payloads (captured JSON of changes)
Username of the logged-in user who triggered the event
Timestamp of the event This structure ensures every critical change in your Pimcore system is logged and easily queryable.
👤 User and Context Awareness Automatically captures the Pimcore user who performed the action.
Captures relevant request context, such as HTTP request payloads and IP addresses (if available). This makes it easy to audit user activity, trace changes, and identify accountability within your application.
⚙️ Pimcore-First Integration Seamless integration with Pimcore’s bundle system:
bin/console pimcore:bundle:install PimcoreAuditBundle creates necessary database structures.
bin/console pimcore:bundle:uninstall PimcoreAuditBundle removes them cleanly.
No extra steps needed to configure queues or services in your Symfony project.
🚀 Production-Ready Designed to work well in production environments with high throughput.
Messenger workers can be supervised using Supervisor, systemd, or run in Docker containers.
Logs are processed in a background worker, keeping the UI and admin actions fast.
📜 License
MIT License
👨💻 Maintainer
MTT Technologies (Minds Task Technologies)
For issues and contributions, please submit a pull request or open an issue on GitHub.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-21