auditor 4.1.0
A milestone release on the road to 5.0. auditor 4.1 decouples the core package from
Doctrine ORM/DBAL, promotes PHP attributes to a provider-agnostic core namespace, and
introducesauditor-doctrine-provider
as the new standalone home for Doctrine support.
✨ What's new
auditor-doctrine-provider — Doctrine support is now a standalone package
The DoctrineProvider and all related classes have been extracted from auditor into a
dedicated package: damienharper/auditor-doctrine-provider.
The auditor core is now Doctrine-free. Only symfony/event-dispatcher and
symfony/options-resolver remain as hard dependencies — making it easier to use auditor
with any ORM or persistence layer.
composer require damienharper/auditor-doctrine-providerNo action required for existing users. The built-in
DoctrineProviderstill works in
4.x — it is deprecated and will be removed in 5.0. Migrate at your own pace.
Core attribute namespace — DH\Auditor\Attribute
PHP attributes (#[Auditable], #[Ignore], #[Security]) are now defined in the
provider-agnostic core namespace DH\Auditor\Attribute, making them available to any
provider — not just Doctrine.
// Before (4.0, still works but deprecated)
use DH\Auditor\Provider\Doctrine\Auditing\Attribute\Auditable;
// After (4.1, canonical)
use DH\Auditor\Attribute\Auditable;The old DH\Auditor\Provider\Doctrine\Auditing\Attribute\* classes remain as deprecated
thin extensions through 4.x and will be removed in 5.0. The AttributeLoader recognises
both namespaces transparently — no change needed on entities that already use the old import.
🔨 Deprecations
The following are deprecated in 4.1 and will be removed in 5.0:
- All 36 classes, interfaces, and traits under
DH\Auditor\Provider\Doctrine\(use
damienharper/auditor-doctrine-providerinstead) DH\Auditor\Provider\Doctrine\Auditing\Attribute\Auditable→DH\Auditor\Attribute\AuditableDH\Auditor\Provider\Doctrine\Auditing\Attribute\Ignore→DH\Auditor\Attribute\IgnoreDH\Auditor\Provider\Doctrine\Auditing\Attribute\Security→DH\Auditor\Attribute\Security
🚀 Migrating from 4.0
For most applications the migration boils down to:
# 1. Install the standalone provider
composer require damienharper/auditor-doctrine-provider
# 2. Update attribute imports (optional in 4.x, required before 5.0)
# DH\Auditor\Provider\Doctrine\Auditing\Attribute\* → DH\Auditor\Attribute\*No schema changes. No behavioral changes. Audit data is fully preserved.
What's Changed
Architecture
- Decouple Doctrine from core and deprecate built-in
DoctrineProviderby @DamienHarper in #306 - Promote PHP attributes to core namespace
DH\Auditor\Attributeby @DamienHarper in #304
Dependencies
- Bump actions/checkout from 4 to 6 by @dependabot in #300
- Bump actions/setup-node from 4 to 6 by @dependabot in #299
- Bump actions/upload-artifact from 6 to 7 by @dependabot in #303
- Bump actions/download-artifact from 7.0.0 to 8.0.0 by @dependabot in #302
References
Full Changelog: 4.0.0...4.1.0