Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated audit entries #403

Open
StonedPunk opened this issue Feb 26, 2024 · 1 comment
Open

Duplicated audit entries #403

StonedPunk opened this issue Feb 26, 2024 · 1 comment

Comments

@StonedPunk
Copy link

PHP Version: 8.2
damienharper/auditor-bundle: 5.2.5
mysql: 8.0.32

Summary
The auditor's table duplicates all actions on the entity: update, create, delete

Inputs
Using an example #251, I fixed the error of auditor records not being created. If I remove this, the records stop being created.

CONFIG
dh_auditor:
enabled: true
providers:
doctrine:
auditing_services:
- '@doctrine.orm.default_entity_manager'
entities:
App\Entity\License\License:
enabled: true
App\Entity\License\LicenseExtended:
enabled: true
App\Entity\License\LicenseOld:
enabled: true

###> DH/Auditor-bundle ###
DH\Auditor\Provider\Doctrine\Auditing\Transaction\TransactionManager:
    arguments: [ '@DH\Auditor\Provider\Doctrine\DoctrineProvider' ]

DH\Auditor\Provider\Doctrine\Auditing\Event\DoctrineSubscriber:
    arguments: [ '@DH\Auditor\Provider\Doctrine\Auditing\Transaction\TransactionManager']
    tags:
        - { name: doctrine.event_subscriber, priority: 1000 }
###> DH/Auditor-bundle ###
@durrentom
Copy link

I'm facing the same issue, but only with APP_ENV=prod.
PHP 8.1, Symfony 5.4

If I explicitly declare the services in services_prod.yaml, I get double entries. If I remove them, nothing gets logged.

In dev mode it works just fine, without any particular configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants