Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Doctrine Footprint Extension

Doctrine Footprint Extension Laravel Package

adrianglazer/doctrine-footprint-extension

Doctrine extension to auto-track entity create/update/delete with timestamps and usernames. Adds created_at/by, updated_at/by, deleted_at/by via a single trait + event subscriber, plus a Doctrine filter for soft deletes.

View on GitHub
Deep Wiki
Context7

This extension provides timestamps and user actions tracking for entity create, update and delete.

Frequently asked questions about Doctrine Footprint Extension
Can I use DoctrineFootprintExtension with Laravel’s Eloquent ORM?
No, this package is designed for **Doctrine ORM** only and won’t work with Laravel’s Eloquent. If you’re using Eloquent, consider alternatives like `spatie/laravel-activitylog` or `owen-it/laravel-auditlogs` instead.
How do I disable soft deletes in this package?
To disable soft deletes, create a **custom trait** that excludes `deletedAt` and `deletedBy` fields. The default trait includes soft delete support via a Doctrine filter, so omitting those fields in your entity will disable it.
Will this work with Laravel’s built-in `timestamps()` and `softDeletes()`?
No, conflicts may arise since this package overrides those fields via Doctrine listeners. If you’re using both systems, you’ll need to **choose one approach** or manually sync metadata between them.
How do I integrate this with Laravel’s Auth system (e.g., `Auth::user()`)?
The package uses Symfony’s `security.token_storage`, so you’ll need a **custom bridge service** to map it to Laravel’s `Auth::user()`. Example: Create a service that converts the Symfony token to a Laravel user object.
Is this package compatible with PHP 8.1+ and Doctrine 3.x?
No, the last release was in **2019** and targets **Doctrine 2.x**, which is end-of-life. You’d need to **fork and update** it for modern PHP/Doctrine versions, or use a maintained alternative.
Does this add significant performance overhead to queries?
The package uses Doctrine filters and listeners, which have minimal runtime impact. However, **soft deletes via filters** can affect query performance in large datasets. Benchmark against alternatives if performance is critical.
How do I install and configure this in Laravel?
Run `composer require adrianglazer/doctrine-footprint-extension`, then configure the **Doctrine filter** in `config/packages/doctrine.yaml` and register the **FootprintListener** in `config/services.yaml` with `@security.token_storage`.
What if I only need audit logs for some entities, not all?
Apply the `FootprintTrait` **only to entities** requiring auditing. The package won’t affect entities without the trait, making it flexible for partial adoption.
Are there better alternatives for Laravel audit logging?
Yes, if you’re using **Eloquent**, consider `spatie/laravel-activitylog` (modern, feature-rich) or `owen-it/laravel-auditlogs` (supports soft deletes). This package is niche for **Doctrine ORM** setups.
How do I handle cases where no user is authenticated (e.g., API calls)?
The package relies on `security.token_storage` to fetch the current user. If no user is logged in, it may set `NULL` for user fields. You can **override the listener** or use middleware to ensure a default user (e.g., a system account).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor