mtt-pimcore-plugin/audit-plugin

Pimcore Audit Logging Plugin with Symfony Messenger Queue support.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:pimcore-bundle

pkg:composer/mtt-pimcore-plugin/audit-plugin

1.0.1 2025-07-22 18:48 UTC

This package is not auto-updated.

Last update: 2026-01-06 15:32:12 UTC


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.